Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 41684013 authored by hhakim's avatar hhakim
Browse files

Support float scalar type for matfaust.proj.* functions.

parent 4c9a700b
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,11 @@ classdef (Abstract) ConstraintGeneric ...@@ -58,7 +58,11 @@ classdef (Abstract) ConstraintGeneric
function pM = project(this, M) function pM = project(this, M)
if(isreal(M)) if(isreal(M))
pM = mexFaustReal('prox', M, this.name.name, this.param, this.normalized, this.pos); if(strcmp(class(M), 'single'))
pM = mexFaustRealFloat('prox', M, this.name.name, this.param, this.normalized, this.pos);
else
pM = mexFaustReal('prox', M, this.name.name, this.param, this.normalized, this.pos);
end
else else
pM = mexFaustCplx('prox', M, this.name.name, this.param, this.normalized, this.pos); pM = mexFaustCplx('prox', M, this.name.name, this.param, this.normalized, this.pos);
end end
......
...@@ -123,13 +123,13 @@ classdef ConstraintName ...@@ -123,13 +123,13 @@ classdef ConstraintName
case 'const' case 'const'
id = ConstraintName.CONST; id = ConstraintName.CONST;
case 'circ' case 'circ'
id = ConstraintName.CIRC id = ConstraintName.CIRC;
case 'toeplitz' case 'toeplitz'
id = ConstraintName.TOEPLITZ id = ConstraintName.TOEPLITZ;
case 'hankel' case 'hankel'
id = ConstraintName.HANKEL id = ConstraintName.HANKEL;
case 'blockdiag' case 'blockdiag'
id = ConstraintName.BLKDIAG id = ConstraintName.BLKDIAG;
otherwise otherwise
error(err_msg) error(err_msg)
end end
......
...@@ -97,7 +97,11 @@ ...@@ -97,7 +97,11 @@
M = S.subs{1}; M = S.subs{1};
% pM = self.constraint.project(M); % pM = self.constraint.project(M);
if(isreal(M)) if(isreal(M))
pM = mexFaustReal('prox_blockdiag', M, self.m_vec, self.n_vec, self.normalized, self.pos); if(strcmp(class(M), 'single'))
pM = mexFaustRealFloat('prox_blockdiag', M, self.m_vec, self.n_vec, self.normalized, self.pos);
else
pM = mexFaustReal('prox_blockdiag', M, self.m_vec, self.n_vec, self.normalized, self.pos);
end
else else
pM = mexFaustCplx('prox_blockdiag', M, self.m_vec, self.n_vec, self.normalized, self.pos); pM = mexFaustCplx('prox_blockdiag', M, self.m_vec, self.n_vec, self.normalized, self.pos);
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment