plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | wittawatj/l1lsmi-master | symfctmex.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/symfctmex.m | 1,995 | utf_8 | 3ee0e104fe769e0c6bb0166c4d426895 | % [L,perm,xsuper,split,tmpsiz] = symfctmex(X, perm, cachsz)
% Computes sparse symbolic factor L, updated permutation PERM,
% super-node partition XSUPER, and a splitting of supernodes
% (SPLIT) to optimize use of the computer cache (assuming
% CACHSZ*1024 byte available). TMPSIZ is the amount of floating
% ... |
github | wittawatj/l1lsmi-master | symbchol.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/symbchol.m | 3,202 | utf_8 | e5baeb18295f5a380fe3efdbad820028 | % L = symbchol(X)
% SYMBCHOL Symbolic block sparse Cholesky factorization.
% L = symbchol(X) returns a structure L that can be used
% by the efficient block sparse Cholesky solver SPARCHOL.
% The fields in L have the following meaning:
%
% L.perm - Mult... |
github | wittawatj/l1lsmi-master | getsymbada.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getsymbada.m | 1,995 | utf_8 | 42f675ab248e96802c62156471bfea3c | % SYMBADA = getsymbada(At,Ajc,DAt,psdblkstart)
% GETSYMBADA
% Ajc points to start of PSD-nonzeros per column
% DAt.q has the nz-structure of ddotA.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi, partitA, getada1, getada2.
function SYMBA... |
github | wittawatj/l1lsmi-master | statsK.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/statsK.m | 1,781 | utf_8 | 12ff626206549b4741bb0281466db66f | % K = statsK(K)
% STATSK Collects statistics (max and sum of dimensions) of cone K
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function K = statsK(K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romank... |
github | wittawatj/l1lsmi-master | qinvjmul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/qinvjmul.m | 2,412 | utf_8 | dec5fb2062e903290a8620345bfea739 | % y = qinvjmul(labx,frmx,b,K)
% QINVJMUL Inverse of Jordan multiply for Lorentz blocks
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = qinvjmul(labx,frmx,b,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copy... |
github | wittawatj/l1lsmi-master | whichcpx.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/whichcpx.m | 1,773 | utf_8 | 4d16082df0beff52bd42dd817cc5db75 | % cpx = whichcpx(K)
% WHICHCPX yields structure cpx.{f,q,r,x}
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function cpx = whichcpx(K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copy... |
github | wittawatj/l1lsmi-master | triumtriu.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/triumtriu.m | 1,790 | utf_8 | af4623a24285a891a4624f08e01e84af | % y = triumtriu(r,u,K)
% TRIUMTRIU Computes y = r * u
% Both r and u should be upper triangular.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = triumtriu(r,u,K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksan... |
github | wittawatj/l1lsmi-master | getada2.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getada2.m | 1,909 | utf_8 | a8fc0f8faec3032542bec1ff776fc6a3 | % ADA = getada2(ADA, DAt,Aord, K)
% GETADA2 Compute ADA += DAt.q'*DAt.q
% IMPORTANT: Updated ADA only on triu(ADA(Aord.qperm,Aord.qperm)).
% Remaining entries are not affected.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi, get... |
github | wittawatj/l1lsmi-master | urotorder.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/urotorder.m | 1,806 | utf_8 | c55b87ead5ce1d3b4f9e4be1a17f617c | % [u,perm,gjc,g] = urotorder(u,K, maxu,permIN)
% UROTORDER Stable reORDERing of triu U-factor by Givens ROTations.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [u,perm,gjc,g] = urotorder(u,K, maxu,permIN) %#ok
%
% This file is part of SeDuMi 1.1 by Imre P... |
github | wittawatj/l1lsmi-master | extractA.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/extractA.m | 2,190 | utf_8 | 38faa28897524f6a7591f7d5abe7d0fc | % Apart = extractA(At,Ajc,blk0,blk1,blkstart[,blkstart2])
% EXTRACTA Fast alternative to
% Apart = At(blkstart(1):blkstart(2)-1,:).
% Instead of blkstart(2), it takes "blkstart2" (if supplied) or
% size(At,1)+1 (if neither blkstart(2) nor blkstart2) are available.
%
% Extract submatrix of
% A with su... |
github | wittawatj/l1lsmi-master | veccomplex.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/veccomplex.m | 3,012 | utf_8 | 6ac71edfba953d1de1ced7b7ee97180e | % z = veccomplex(x,cpx,K)
% ********** INTERNAL FUNCTION OF SEDUMI **********
function z = veccomplex(x,cpx,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CANADA (since 1.1)
%
% Copyright (C) 2001 Jos F. Sturm (up to 1.05R5)
% Dept. E... |
github | wittawatj/l1lsmi-master | vec.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/vec.m | 1,567 | utf_8 | f3fc35a93c8a5b99b592835a0b810dd5 | % Y = VEC(x) Given an m x n matrix x, this produces the vector Y of length
% m*n that contains the columns of the matrix x, stacked below each other.
%
% See also mat.
function x = vec(X)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CAN... |
github | wittawatj/l1lsmi-master | sdinit.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sdinit.m | 4,508 | utf_8 | 267a7f165ea8a2d377b14f1b99a7aba1 | % [d, v,vfrm,y,y0, R] = sdinit(At,b,c,dense,K,pars)
% SDINIT Initialize with identity solution, for self-dual model.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [d, v,vfrm,y,y0, R] = sdinit(At,b,c,dense,K,pars)
%
% This file is part of SeDuMi 1.1 b... |
github | wittawatj/l1lsmi-master | psdscale.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/psdscale.m | 1,959 | utf_8 | 770b93fdb91b4c4d02c0bfc059944772 | % y = psdscale(ud,x,K [,transp])
% PSDSCALE Computes length lenud (=sum(K.s.^2)) vector y.
% !transp (default) then y[k] = vec(Ldk' * Xk * Ldk)
% transp == 1 then y[k] = vec(Udk' * Xk * Udk)
% Uses pivot ordering ud.perm if available and nonempty.
%
% ********** INTERNA... |
github | wittawatj/l1lsmi-master | checkpars.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/checkpars.m | 6,071 | utf_8 | da40b9aac0adccb29295386a27185b91 | % pars = checkpars(pars,lponly)
% CHECKPARS Fills in defaults for missing fields in "pars" structure.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function pars = checkpars(pars,lponly)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksa... |
github | wittawatj/l1lsmi-master | optstep.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/optstep.m | 6,191 | utf_8 | bc62e0d560688a72cbd832c86bba9e77 | % [x,y] = optstep(A,b,c, y0,y,d,v,dxmdz, K,L,symLden,...
% dense,Ablkjc,Aord,ADA,DAt, feasratio, R,pars)
% OPTSTEP Implements Mehrotra-Ye type optimality projection for
% IPM-LP solver.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [x,y] = optst... |
github | wittawatj/l1lsmi-master | pretransfo.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/pretransfo.m | 12,376 | utf_8 | 22e92410d193f1dccd5a3ebf519a5cf1 | % [At,b,c,K,prep] = pretransfo(At,b,c,K)
% PRETRANSFO Checks data and then transforms into internal SeDuMi format.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [At,b,c,K,prep,origcoeff] = pretransfo(At,b,c,K,pars)
% This file is part of SeDu... |
github | wittawatj/l1lsmi-master | deninfac.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/deninfac.m | 3,914 | utf_8 | 61f3f35cb2518796105cc91d357445ea | % [Lden, Ld] = deninfac(symLden, L,dense,DAt, d, absd, qblkstart,pars)
% DENINFAC
% Uses pars.maxuden as max. allowable |L(i,k)|. Otherwise num. reordering.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function [Lden, Ld] = deninfac(symLden, L,dense,DAt, d, a... |
github | wittawatj/l1lsmi-master | eigK.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/eigK.m | 4,382 | utf_8 | 4b02b6a578f63c31959eba058ef6e882 | % [lab,q,f] = eigK(x,K)
%
% EIGK Computes the spectral values ("eigenvalues") or even the complete
% spectral decomposition of a vector x with respect to a self-dual
% homogeneous cone K.
%
% > LAB = EIGK(x,K) This yield the spectral values of x with res... |
github | wittawatj/l1lsmi-master | wrapPcg.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/wrapPcg.m | 4,662 | utf_8 | 33ac2b19c5fe1a1134b316f4ebd23ff3 | % [y,r,k, DAy] = normeqPcg(L,Lden,At,dense,d, DAt,K, b, cgpars, y0,rhs)
%
% WRAPPCG Solve y from AP(d)A' * y = b
% using PCG-method and Cholesky L as conditioner.
% If L is sufficiently accurate, then only 1 CG-step is needed.
% In general, proceeds until ||DAy - DA'(AD^2A')^{-1}b||
% has converged (to zero). k = #... |
github | wittawatj/l1lsmi-master | tdet.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/tdet.m | 1,694 | utf_8 | 7a2fdbbae2cf6f49c63b0fbe423048b2 | % tdetx = tdet(x,K)
% TDET Computes twice determinant for Lorentz block
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function tdetx = tdet(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster ... |
github | wittawatj/l1lsmi-master | ordmmdmex.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/ordmmdmex.m | 1,276 | utf_8 | 2a4dfead83a0a8fb355b08bf98095d09 | % perm = ordmmdmex(adjncy)
% Computes multiple-minimum-degree permutation, for sparse
% Cholesky. Adjncy is a sparse symmetric matrix; its diagonal
% is irrelevant.
%
% Invokes SPARSPAK-A Release III.
%
% ********** INTERNAL FUNCTION OF CHOLTOOL **********
function perm = ordmmdmex(adjncy) %#ok
%
% This ... |
github | wittawatj/l1lsmi-master | quadadd.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/quadadd.m | 1,825 | utf_8 | 131810176add234a666ec089199b10e2 | % [zhi,zlo] = quadadd(xhi,xlo,y)
% QUADADD Compute (zhi+zlo) = (xhi+xlo) + y.
% x an z are in double-double format (quad precision)
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [zhi,zlo] = quadadd(xhi,xlo,y) %#ok
%
% This file is part of S... |
github | wittawatj/l1lsmi-master | vectril.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/vectril.m | 1,767 | utf_8 | 4e66081b4bac22fb8b28d7f268fbf94d | % y = vectril(x,K)
% VECTRIL converts "PSD" blocks to lower triangular form.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = vectril(x,K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright ... |
github | wittawatj/l1lsmi-master | partitA.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/partitA.m | 1,824 | utf_8 | fb7ff13151fcc96c02329c56ed1e8150 | % Ablkjc = partitA(At,blkstart)
% PARTITA Partition columns of A according to the subscripts listed in blkstart.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function Ablkjc = partitA(At,blkstart) %#ok
%
% This file is part of Se... |
github | wittawatj/l1lsmi-master | psdinvjmul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/psdinvjmul.m | 1,792 | utf_8 | 2a5727cc9ada9b316c3ab7e02108f360 | % z = psdinvjmul(xlab,xfrm, y, K)
% PSDINVJMUL solves x jmul z = y, with x = XFRM*diag(xlab)*XFRM'
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = psdinvjmul(xlab,xfrm, y, K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Ole... |
github | wittawatj/l1lsmi-master | getDAt.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getDAt.m | 2,047 | utf_8 | 955b46a8bcd786afb28023a554dda11e | % [DAtq, DAts] = getDAt(At,Ablk,colsel, d,ud,K)
%
%Creates
% DAt.s full nnz x 1 vector, containing nonzeroblocks(T) with T a
% sparse N x length(colsel) matrix, with Ablk.s(:,colsel) block struct.
% NOTE: only triu(.) stored per block, with redundant 0's in tril.
% So triu(Ud*Aik*Ud') in nonzero block (i,k... |
github | wittawatj/l1lsmi-master | bwdpr1.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/bwdpr1.m | 1,839 | utf_8 | cc67206618354da22b36aa26f589be0b | % y = bwdpr1(Lden, b)
% BWDPR1 Solves "PROD_k L(pk,betak)' * y = b", where
% L(p,beta) = eye(n) + tril(p*beta',-1).
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi, dpr1fact, fwdpr1
function y = bwdpr1(Lden, b) %#ok
%
% This fil... |
github | wittawatj/l1lsmi-master | frameit.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/frameit.m | 1,599 | utf_8 | ba115a5f45db40a0d4b7b0d571b6d132 | % x = frameit(lab,frmq,frms,K)
% FRAMEIT
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function x = frameit(lab,frmq,frms,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamil... |
github | wittawatj/l1lsmi-master | getada1.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getada1.m | 2,344 | utf_8 | 72456fbfce3581bef8cffe63918f52ef | % ADA = getada1(ADA, A,Ajc2,perm, d, blkstart)
% GETADA1 Compute ADA(i,j) = (D(d^2; LP,Lorentz)*A.t(:,i))' *A.t(:,j),
% and exploit sparsity as much as possible.
% Ajc2 points just beyond LP/Lorentz nonzeros for each column
% blkstart = K.qblkstart partitions into Lorentz blocks.
... |
github | wittawatj/l1lsmi-master | sddir.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sddir.m | 3,345 | utf_8 | 00ebfa573895fcf59bc790b35a0eb489 | % [dx,dy,dz,dy0, err] = sddir(L,Lden,Lsd,p,...
% d,v,vfrm,At,DAt,dense, R,K,y,y0,b, pars)
% SDDIR Direction decomposition for Ye-Todd-Mizuno self-dual embedding.
% Here, p is the direction p = dx+dz. If p=[], then assume p=-v,
% the "affine scalin... |
github | wittawatj/l1lsmi-master | bwblkslv.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/bwblkslv.m | 1,552 | utf_8 | c1f456a8c6ebf5f0796dabd8b9cc048a | % BWBLKSLV Solves block sparse upper-triangular system.
% y = bwblkslv(L,b) yields the same result as
% y(L.perm,:) = L.L'\b
% However, BWBLKSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% Typical use, with X sparse... |
github | wittawatj/l1lsmi-master | sqrtinv.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sqrtinv.m | 1,824 | utf_8 | 68a38a6e705f9d406d661663b087c23b | % y = sqrtinv(q,vlab,K)
% SQRTINV Computes for PSD-cone, y = (Q / diag(sqrt(vlab)))', so that
% Y'*Y = inv(Q * diag(vlab) * Q').
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = sqrtinv(q,vlab,K) %#ok
%
% This file is part of Se... |
github | wittawatj/l1lsmi-master | vecsym.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/vecsym.m | 1,774 | utf_8 | e8bafb30ca868fd82ac9e44d7da456ae | % y = vecsym(x,K)
% VECSYM For the PSD submatrices, we let Yk = (Xk+Xk')/2
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = vecsym(x,K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Cop... |
github | wittawatj/l1lsmi-master | makereal.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/makereal.m | 1,816 | utf_8 | c7523f6fb7f361b22f078cb866f13821 | % y = makereal(x,K,cpx)
% MAKEREAL Converts matrix in MATLAB-complex format to internal
% SeDuMi format.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function y = makereal(x,K,cpx) %#ok
%
% This file is part of SeDuMi 1.1... |
github | wittawatj/l1lsmi-master | Amul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/Amul.m | 2,015 | utf_8 | 63896499de3110a85a05de4f8e1f5544 | % y = Amul(At,dense,x,transp)
% AMUL Computes A*x (transp=0) or A'*x (transp=1), taking care of dense.A.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = Amul(At,dense,x,transp)
%
% This file is part of SeDuMi 1.1 by Imre Polik and ... |
github | wittawatj/l1lsmi-master | stepdif.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/stepdif.m | 6,835 | utf_8 | 803f391d9c0c26053c444dba070d4fcf | % [t,rcdx] = stepdif(d,R,y0,x,y,z,dy0,dx,dy,dz,b,mint,tpmtd)
% STEPDIF Implements Primal-Dual Step-Differentiation for self-dual model
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [t,rcdx] = stepdif(d,R,y0,x,y,z,dy0,dx,dy,dz,b,mint,tpmtd)
%
% This file is part of... |
github | wittawatj/l1lsmi-master | qblkmul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/qblkmul.m | 1,859 | utf_8 | be9edb4afa8e1b5a177128c2d763cf45 | % y = qblkmul(mu,d,blkstart)
% QBLKMUL yields length(y)=blkstart(end)-blkstart(1) vector with
% y[k] = mu(k) * d[k]; the blocks d[k] are partitioned by blkstart.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = qblkmul(mu,d,blkst... |
github | wittawatj/l1lsmi-master | psdjmul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/psdjmul.m | 1,755 | utf_8 | 506c82552e7415cfa8c1bdda843f04e7 | % y = psdmul(x,y, K)
% PSDMUL for full x,y. Computes (XY+YX)/2
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = psdmul(x,y, K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McM... |
github | wittawatj/l1lsmi-master | widelen.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/widelen.m | 4,540 | utf_8 | ea67b35fe454155406b1befa98b5f16e | % [t,wr,w] = widelen(xc,zc,y0, dx,dz,dy0,d2y0, maxt,pars,K)
%
% WIDELEN Computes approximate wide-region neighborhood step length.
% Does extensive line search only if it pays, that is the resulting
% rate will be at most twice the best possible rate, and the step-length
% at least half of the best possib... |
github | wittawatj/l1lsmi-master | psdeig.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/psdeig.m | 1,952 | utf_8 | 50e3a6e7819b74113699c0ada2817b41 | % [lab,q] = psdeig(x,K)
% PSDEIG Computes spectral coefficients of x w.r.t. K
% Arguments "q" is optional - without it's considerably faster.
% FLOPS indication: 1.3 nk^3 versus 9.0 nk^3 for nk=500,
% 1.5 nk^3 9.8 nk^3 for nk=50.
%
% *******... |
github | wittawatj/l1lsmi-master | sdfactor.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sdfactor.m | 2,631 | utf_8 | e62701908298cc22d28d0d80e71a8eda | % [Lsd,Rscl] = sdfactor(L,Lden, dense,DAt, d,v,y, At,K,R,y0,pars)
% SDFACTOR Factor self-dual embedding
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function Lsd = sdfactor(L,Lden, dense,DAt, d,v,y, At,c,K,R,y0,pars)
%
% This file is part of SeDuMi 1.1 by Imre Pol... |
github | wittawatj/l1lsmi-master | maxstep.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/maxstep.m | 2,658 | utf_8 | 023afea585f5fd2ff2ad4c7a43227dd0 | % tp = maxstep(dx,x,auxx,K)
% MAXSTEP Computes maximal step length to the boundary of the cone K.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function tp = maxstep(dx,x,auxx,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% ... |
github | wittawatj/l1lsmi-master | getada3.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getada3.m | 2,063 | utf_8 | 1ff16105e0af414153ae7d3600ca68c0 | % [ADA,absd] = getada3(ADA, A,Ajc1,Aord, udsqr,K)
% GETADA3 Compute ADA(i,j) = (D(d^2)*A.t(:,i))' *A.t(:,j),
% and exploit sparsity as much as possible.
% absd - length m output vector, containing
% absd(i) = abs((D(d^2)*A.t(:,i))' *abs(A.t(:,i)).
% Hence, diag(ADA)./absd gives a... |
github | wittawatj/l1lsmi-master | mat.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/mat.m | 1,783 | utf_8 | b49140ac21c615f717adf5867e9c6906 | % Y = MAT(x,n) or Y = MAT(x) (the 2nd argument is optional)
% Given a vector of length n^2, this produces the n x n matrix
% Y such that x = vec(Y). In other words, x contains the columns of the
% matrix Y, stacked below each other.
%
% See also vec.
function X = mat(x,n)
%
% This file is part of SeDuM... |
github | wittawatj/l1lsmi-master | blkchol.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/blkchol.m | 2,547 | utf_8 | 6f7fc909c31c7f34091f5f52ef0cee7b | % [L.L, L.d, L.skip, L.add] = blkchol(L,X,pars,absd)
% BLKCHOL Fast block sparse Cholesky factorization.
% The sparse Cholesky factor will be placed in the fields L.L, L.d;
% the symbolic factorization fields remain unchanged.
% On input, L should be the symbolic factorizati... |
github | wittawatj/l1lsmi-master | psdfactor.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/psdfactor.m | 1,761 | utf_8 | 63513cc937318f950b5cbe35688cc6e9 | % [ux,ispos] = psdfactor(x,K)
% PSDFACTOR UX'*UX Cholesky factorization
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [ux,ispos] = psdfactor(x,K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) ... |
github | wittawatj/l1lsmi-master | adendotd.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/adendotd.m | 1,838 | utf_8 | 4d254eaefeb986496ae5a4d5c50072bd | % Ad = Adendotd(dense, d, sparAd, Ablk, blkstart)
% ADENDOTD Computes d[k]'*Aj[k] for Lorentz blocks that are to be factored
% by dpr1fact.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function Ad = adendotd(dense, d, sparAd, Ablk, blkstart) %#ok
%
% This file... |
github | wittawatj/l1lsmi-master | qjmul.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/qjmul.m | 2,476 | utf_8 | e434772ee132e40b3ab58f68111dd18d | % z = qjmul(x,y,K)
% QJMUL Implements Jordan product for Lorentz cones
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = qjmul(x,y,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMas... |
github | wittawatj/l1lsmi-master | wregion.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/wregion.m | 8,085 | utf_8 | c496ac13201996544da0acfbc1aff6b9 | % [xscl,y,zscl,y0, w,relt, dxmdz,err, wr] = wregion(L,Lden,Lsd,...
% d,v,vfrm,A,DAt,dense, R,K,y,y0,b, pars, wr)
% WREGION Implements Sturm-Zhang Wide-region Interior Point Method.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function... |
github | wittawatj/l1lsmi-master | ddot.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/ddot.m | 2,042 | utf_8 | b27a61411cecdc0b42404ff7e57c23f9 | % ddotX = ddot(d,X,blkstart [, Xblkjc])
% DDOT Given N x m matrix X, creates (blkstart(end)-blkstart(1)) x m matrix
% ddotX, having entries d[i]'* xj[i] for each (Lorentz norm bound) block
% blkstart(i):blkstart(i+1)-1. If X is sparse, then Xblkjc(:,2:3) should
% point to first and... |
github | wittawatj/l1lsmi-master | getdense.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getdense.m | 4,749 | utf_8 | ce92354a29a0583d5c345a234e7436e5 | % [dense,Adotdden] = getdense(At,Ablkjc,K,pars)
% GETDENSE Creates dense.{l,cols,q}.
% Try to find small proportion of the cone primitives that appear
% in a large proportion of the primal constraints.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See als... |
github | wittawatj/l1lsmi-master | givensrot.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/givensrot.m | 1,730 | utf_8 | 9b2c89677ffabfe01281e6eb5287c669 | % y = givensrot(gjc,g,x,K)
% GIVENSROT
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = givensrot(gjc,g,x,K) %#ok
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilto... |
github | wittawatj/l1lsmi-master | sparbwslv.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sparbwslv.m | 1,987 | utf_8 | ddbdea0707b9d46c24cbca973a60de5f | % SPARBWSLV Solves block sparse upper-triangular system.
% y = sparbwslv(L,b) yields the same result as
% y(L.perm,:) = L.L'\b
% However, SPARBWSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% Typical use, with X spa... |
github | wittawatj/l1lsmi-master | cellK.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/cellK.m | 3,487 | utf_8 | 4fc2753dbba84d2e10c5a8ff4e7def27 | % xcell = cellK(x,K)
% CELLK Stores SeDuMi cone K-vector in cell-array format.
%
% On output xcell.f and xcell.l are the free and >=0 components,
% xcell.q{k}, xcell.r{k} and xcell.s{k} contain the Lorentz,
% Rotated Lorentz, and PSD-components, resp.
% xcell.s{... |
github | wittawatj/l1lsmi-master | prelp.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/prelp.m | 3,757 | utf_8 | 47ebf5aa610ba321fa7ca4b8a1c72bf4 | % PRELP Loads and preprocesses LP from an MPS file.
%
% > [A,b,c,lenx,lbounds] = PRELP('problemname')
% The above command results in an LP in standard form,
% - Instead of specifying the problemname, you can also use PRELP([]), to
% get the problem from the file /tmp/default.mat.
% - Also, you may type PRE... |
github | wittawatj/l1lsmi-master | feasreal.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/feasreal.m | 4,144 | utf_8 | 454dcb6c42c0642ed5c5a524e84bec58 | % FEASREAL Generates a random sparse optimization problem with
% linear, quadratic and semi-definite constraints. Output
% can be used by SEDUMI. All data will be real-valued.
%
% The following two lines are typical:
% > [AT,B,C,K] = FEASREAL;
% > [X,Y,INFO] = SEDUMI(AT,B,C,K);
%
% An extended version is:
% > [... |
github | wittawatj/l1lsmi-master | sdpa2vec.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/sdpa2vec.m | 2,352 | utf_8 | f055b4df357f6cf3b426ce27869bc738 | % x = sdpavec(E,K)
% Takes an SDPA type sparse data description E, i.e.
% E(1,:) = block, E(2,:) = row, E(3,:) = column, E(4,:) = entry,
% and transforms it into a "long" vector, with vectorized matrices for
% each block stacked under each other. The size of each matrix block
% is given in the field K.s.
% **********... |
github | wittawatj/l1lsmi-master | blk2vec.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/blk2vec.m | 1,653 | utf_8 | 0d48b96f66e746fce480e7a3e9c271a5 | % x = blk2vec(X,nL)
%
% Converts a block diagonal matrix into a vector.
%
% ********** INTERNAL FUNCTION OF FROMPACK **********
function x = blk2vec(X,nL)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CANADA (since 1.1)
%
% Copyright (C)... |
github | wittawatj/l1lsmi-master | writesdp.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/writesdp.m | 4,735 | utf_8 | 1cce55d9c10b6bfc35a1552eec0c573e | % This function takes a problem in SeDuMi MATLAB format and writes it out
% in SDPpack format.
%
% Usage:
%
% writesdp(fname,A,b,c,K)
%
% fname Name of SDPpack file, in quotes
% A,b,c,K Problem in SeDuMi form
%
% Notes:
%
% Problems with complex data are not allowed.
%
% ... |
github | wittawatj/l1lsmi-master | frompack.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/frompack.m | 2,509 | utf_8 | a4730dcb4ec069944953dce753da973d | % FROMPACK Converts a cone problem in SDPPACK format to SEDUMI format.
%
% [At,c] = frompack(A,b,C,blk) Given a problem (A,b,C,blk) in the
% SDPPACK-0.9-beta format, this produces At and c for use with
% SeDuMi. This lets you execute
%
% [x,y,info] = SEDUMI(At,b,c,blk);
%
% IMPORTANT: this function assumes that th... |
github | wittawatj/l1lsmi-master | feascpx.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/conversion/feascpx.m | 4,385 | utf_8 | c48c6cf336cdb94ad12b04e1efd2417b | % FEASCPX Generates a random sparse optimization problem with
% linear, quadratic and semi-definite constraints. Output
% can be used by SEDUMI. Includes complex-valued data.
%
% The following two lines are typical:
% > [AT,B,C,K] = FEASCPX;
% > [X,Y,INFO] = SEDUMI(AT,B,C,K);
%
% An extended version is:
% > [AT... |
github | wittawatj/l1lsmi-master | barVTV.m | .m | l1lsmi-master/plot/barVTV.m | 984 | utf_8 | 4039cbb38bef217f00c2ec76681517c4 | function h = barVTV(VTV, titlestr)
%
% Plot VTV in a bar-liked chart.
% X-axis is v, Y-axis is features.
% This shows which features are selected as v is varied.
% VTV is a struct array with fields:
% - W
% - v
% - f
% - rankList
%
m = length(VTV(1).W);
CB = cellfun(@(rl)(binarizeRankList(rl,m)), {VTV.rankList}, ... |
github | wittawatj/l1lsmi-master | nFMeasurePlot.m | .m | l1lsmi-master/plot/nFMeasurePlot.m | 2,826 | utf_8 | b2ba8fb247fd1388155ff27fa87574cd | function nFMeasurePlot( Exps, dataname )
%
% Plot where x-axis is the datasize, and y-axis
% is the f-measure for the specified artificial data.
% One line in the plot corresponds to one method.
%
% Assume n in the same exp is equal for all methods.
%
if length(Exps) <= 1
error('%s: Exps should contain at least... |
github | wittawatj/l1lsmi-master | mergeTrials.m | .m | l1lsmi-master/plot/mergeTrials.m | 3,637 | utf_8 | ae7a67c1055e441a9a4abff7499f2026 | function mergeTrials( exp, datasetPrefixes, methodPrefixes )
%
% Merge trial files into one file for each method-dataset pair.
% Prefix the result file with tm_...
%
if nargin < 3
methodPrefixes = {'mrmr', 'relief', 'pc', 'pghsic', 'pglsmi', 'lasso'};
end
if nargin < 2
datasetPrefixes = [num2cell(char('0'+(0:9... |
github | wittawatj/l1lsmi-master | allFeaturesVsErr.m | .m | l1lsmi-master/plot/allFeaturesVsErr.m | 1,568 | utf_8 | c1f355a18b53e41d5e643f0256193481 | function allFeaturesVsErr(expnum, datasetPrefixes, methodPrefixes, knngauss)
%
% Plot number of features vs. err on all datasets.
%
rows = 1;
cols = 1;
if nargin < 4
knngauss=false;
end
if nargin < 3
% filter: begin with one of ...
% methodPrefixes = {'balsmi', 'bahsic', 'folsmi','fohsic', 'rlsmi', 'rhsi... |
github | wittawatj/l1lsmi-master | fmeasureTable.m | .m | l1lsmi-master/plot/fmeasureTable.m | 3,133 | utf_8 | 1811bff095a20739da810be6d1d7dbe1 | function fmeasureTable( exp, inDatas, inMethods, alpha, dest,renew)
%
% Table results for artificial datasets.
%
if nargin < 6
renew = false;
end
if nargin < 5
dest = sprintf('exp/exp%d/exp%d_fmeasure.csv', exp, exp);
end
if nargin < 4
alpha = 0.05;
end
if nargin < 3 || isempty(inMethods)
inMet... |
github | wittawatj/l1lsmi-master | exportTrialsResults.m | .m | l1lsmi-master/plot/exportTrialsResults.m | 6,383 | utf_8 | d03e306a1db535c09ccf4ca7df3cde0f | function exportTrialsResults( exp, maxtrials, options)
%
% Export results to CSV. The expFolder has to contain one trial-merged
% (tm_...mat) file for each method-dataset pair. See mergeTrials.m
%
% options is a struct
%
error('Just copied from smit. Modify it first.');
if nargin < 3
options = [];
end
% , expres... |
github | wittawatj/l1lsmi-master | FMeasureBar.m | .m | l1lsmi-master/plot/FMeasureBar.m | 2,713 | utf_8 | f9a08dee908082af37c49f813648c7ed | function FMeasureBar( exp, inDatas, inMethods, renew)
%
% Bar chart where x-axis is datasets, and y-axis
% is the f-measure.
%
if nargin < 4
renew = false;
end
if nargin < 3 || isempty(inMethods)
inMethods = {};
end
if nargin < 2 || isempty(inDatas)
inDatas = {};
end
cacheName = 'fmeasure_cells.mat';... |
github | wittawatj/l1lsmi-master | plotFeaturesVsErr.m | .m | l1lsmi-master/plot/plotFeaturesVsErr.m | 3,615 | utf_8 | cc558e8f5ecc386bc0ab4a8edefde61b | function plotFeaturesVsErr( expnum, dataset, methodPrefixes, knngauss, labelmap)
%
% Plot the number of selected features on the x-axis, and
% prediction's error on y-axis. batchPredictVark must have been used
% before this function can be used. This requires vark results.
%
fontsize = 34;
if nargin < 5
labelmap ... |
github | wittawatj/l1lsmi-master | exportResults.m | .m | l1lsmi-master/plot/exportResults.m | 6,137 | utf_8 | ae139a8153dfd83a511e07adb1cbb346 | function exportResults( exp, maxtrials, expression, alpha, dest)
%
% Export results to CSV. The expFolder has to contain one folder for
% each method-dataset pair. In side the folder, the result of one trial
% is contained in one file.
%
% expression is a Matlab's expression string used to retrieve
% information in e... |
github | wittawatj/l1lsmi-master | fmeasureCells.m | .m | l1lsmi-master/plot/fmeasureCells.m | 2,766 | utf_8 | ee2fb1388e303935990bc5ae33749114 | function [FM, DataInd, MetInd, n]= fmeasureCells( exp, inDatas, inMethods)
%
% Table results for artificial datasets.
%
if nargin < 2 || isempty(inDatas)
inDatas = {};
end
if nargin < 3 || isempty(inMethods)
inMethods = {};
end
% f-measure scores (datasets x methods)
FM = cell(1, 1);
% Map method to i... |
github | wittawatj/l1lsmi-master | lassploresolver.m | .m | l1lsmi-master/other/lassplore/lassploresolver.m | 3,593 | utf_8 | b5f98433d75a0442fdf0ee9f055e7f1c | function [ Wh, Info ] = lassploresolver(W0, fobj, options)
%
% A general constrainted optimization solver based on LASSPLORE.
% "Large-scale sparse logistic regression". The solver should be able to
% solve any problems as long as the constraint can be formulated as a
% projection operation on the respective constraint... |
github | wittawatj/l1lsmi-master | funObjNegHSIC.m | .m | l1lsmi-master/other/hsic/funObjNegHSIC.m | 1,902 | utf_8 | 6d72f6291ab4e4200ad0dd2cce4bd73d | function [ nhsic, DF] = funObjNegHSIC( W, X, LH, HLH, options, refInfo)
%
%
[m n] = size(X);
if all(W==0)
nhsic = inf;
DF = zeros(m,1);
return;
end
Z = bsxfun(@times, W, X);
if useMedHeu(refInfo, options)
% Median heuristic should be used in this iteration
sigmaz = meddistance(Z);
fprintf('m... |
github | wittawatj/l1lsmi-master | fs_rhsic.m | .m | l1lsmi-master/other/hsic/fs_rhsic.m | 943 | utf_8 | 38208a93d258a503de5e2923c68e2980 | function S = fs_rhsic( X, Y, options )
%
% Ranking HSIC. Calculate HSIC between Xi and Y.
% Rank features based on the HSIC score.
%
k = options.k;
t0 = cputime;
tic;
HSIC = HSICEach(X,Y);
HSIC(isnan(HSIC)) = -inf;
[HSIC , HSICInd] = sort(HSIC, 'descend');
F = false(1 , size(X, 1) );
F(HSICInd(1:k) ) = true;
timet... |
github | wittawatj/l1lsmi-master | fs_rlsmi.m | .m | l1lsmi-master/other/LSMI/fs_rlsmi.m | 1,768 | utf_8 | 87832f29c35a7a994cdaceb074d9d70e | function S = fs_rlsmi( X, Y, options )
%
% Ranking LSMI. Calculate LSMI between Xi and Y.
% Rank features based on the LSMI score.
%
k = options.k;
[m n] = size(X);
sigmaxfactor_list = myProcessOptions(options, 'sigmaxfactor_list', ...
[1/5, 1/2, 1, 2, 5]);
lsmilambda_list = myProcessOptions(options, 'lsmilambda_... |
github | wittawatj/l1lsmi-master | mlsmi_dis.m | .m | l1lsmi-master/other/mlsmi/mlsmi_dis.m | 7,176 | utf_8 | 9cd993f2d16ac7b1304bf1b45d0665b0 | function W2= mlsmi_dis( X, Y, options)
%
% Minimize LSMI. Features which minize LSMI the most are removed.
% The complement is selected.
%
% Algorithm:
% - Initialize W to (1,1,...,1)^T
% - While W not converged:
% - Solve for Alpha (Alpha must be non-negative)
% - Solve for W
%
if nargin < 3
options = [];
end... |
github | wittawatj/l1lsmi-master | fobjLassLSMI_cont.m | .m | l1lsmi-master/other/lasslsmi/fobjLassLSMI_cont.m | 4,052 | utf_8 | 1213a8b155269d5daef9405e3ccfd38a | function [ nlsmip, DF] = fobjLassLSMI_cont(W, X, Y, const, options)
%
% Function object of DLSMI to be used with Mark Schmidt's optimizer.
% const = structure containing constants
% W = an m-dimensional column vector
%
[m n] = size(X);
if all(W==0)
nlsmip = inf;
DF = zeros(m,1);
return;
end
% Initi... |
github | wittawatj/l1lsmi-master | LICA.m | .m | l1lsmi-master/other/LICA/LICA.m | 12,609 | utf_8 | c33ed5b32c1072b727c5763456c91383 | function [W,sigma,lambda,PARAMETERS,Wcand] = LICA(Y,insigma,inlambda,b,INPARAM)
%
% Least squares independent component analysis (LICA)
%
% Usage:
% [W,sigma,lambda,PARAMETERS,Wcand] = LICA(Y,insigma,inlambda,b,INPARAM)
%
% Input:
% Y : dy by n signal matrix
%
% insigma: array of candidates of Gaussia... |
github | wittawatj/l1lsmi-master | ztuner_seq_radius.m | .m | l1lsmi-master/other/pglsmi/ztuner_seq_radius.m | 3,990 | utf_8 | 681498887d6c7eb144716b6080cc4bd6 | function [ZT, ZTLog] = ztuner_seq_radius(X, Y, options)
%
% Tune z (l1 ball width) from low to high. Stop when k features are found.
% This is recommended over tuning from high to low since W may approach
% infinity when v is high. Also, typically k is low. So starting from
% low z makes sense.
%
% Very similar to zt... |
github | wittawatj/l1lsmi-master | fobjNemiLSMI_cont.m | .m | l1lsmi-master/other/nemilsmi/fobjNemiLSMI_cont.m | 4,662 | utf_8 | bc3b56ff89695df12c512700de993e27 | function [ nlsmi, DF] = fobjNemiLSMI_cont(W, X, Y, const, options, refInfo)
%
% Function object of DLSMI to be used with Mark Schmidt's optimizer and
% plaingradient.m.
% const = structure containing constants
% W = an m-dimensional column vector
%
[m n] = size(X);
if all(W==0)
nlsmi = inf;
DF = zeros(m,1)... |
github | wittawatj/l1lsmi-master | spam2.m | .m | l1lsmi-master/other/spam2/spam2.m | 2,068 | utf_8 | 5127fb8a751034b8eb33393d161f9041 | function [B, ctime, ttime] = spam2(KK, Y, lambda, options)
%
% Solve SpAM's optimization problem as defined in the paper
% "High-Dimensional Feature Selection by Kernel-Based Feature-Wise Non-Linear Lasso".
% There is no constraint in this formulation. We use gradient descent here.
%
% Follow the notation in the paper... |
github | sailor01/GeodesicActiveContour-master | distReg.m | .m | GeodesicActiveContour-master/distReg.m | 608 | utf_8 | 53e37589f27ce5b04b95f0285a95b1b9 | % This MATLAB code demonstrates the calculation of the distance regularization term for
% the level set evolution
function [ dReg ] = distReg( phi )
% compute the distance regularization term with the double-well potential
[gPhiX,gPhiY] = gradient(phi);
root = sqrt(gPhiX.^2 + gPhiY.^2);
a = (root>=0) & (root<=1);
b =... |
github | sailor01/GeodesicActiveContour-master | Dirac.m | .m | GeodesicActiveContour-master/Dirac.m | 266 | utf_8 | ad77e7ee45663b04ed4d7ee08248c27c | % This MATLAB code demonstrates the calculation of the Dirac delta function term for the
% level set evolution
function [ deltaPhi ] = Dirac( phi, epsilon )
f = (epsilon/2)*(1 + cos(pi*phi/epsilon));
b = (phi >= -epsilon) & (phi <= epsilon);
deltaPhi = f.*b;
end
|
github | sailor01/GeodesicActiveContour-master | COM.m | .m | GeodesicActiveContour-master/COM.m | 436 | utf_8 | 5f9bac97d2a71af2fff66fde1d4c13df | % This MATLAB code calculates the center of mass of the frame difference
function [ com ] = COM( currframe, prevframe )
currframe = rgb2gray(currframe);
currframe = im2bw(currframe,0.8);
prevframe = rgb2gray(prevframe);
prevframe = im2bw(prevframe,0.8);
diff = currframe - prevframe;
[row,col] = find(diff<0);
for i=1... |
github | sailor01/GeodesicActiveContour-master | GeodesicActiveContour.m | .m | GeodesicActiveContour-master/GeodesicActiveContour.m | 2,736 | utf_8 | df3d91e69b95205aef31001032f61a1a | % This MATLAB code demonstrates the geodesic active contour model using distance regularized
% level sets for object tracking in videos
function [ ] = GeodesicActiveContour( )
clear all;
% Part of video to be used (time in seconds)
tstart = 18;
tend = 23;
% Read video & get frame rate
obj = VideoReader('robot2.mp4... |
github | sailor01/GeodesicActiveContour-master | Neumann.m | .m | GeodesicActiveContour-master/Neumann.m | 320 | utf_8 | 7a02abbdd9165ac4cabd611066489390 | % This MATLAB code demonstrates the calculation of the Neumann boundary term for the
% level set evolution
function [ g ] = Neumann( phi )
[nrow, ncol] = size(phi);
g = phi;
g([1 nrow],[1 ncol]) = g([3 nrow-2],[3 ncol-2]);
g([1 nrow],2:end-1) = g([3 nrow-2],2:end-1);
g(2:end-1,[1 ncol]) = g(2:end-1,[3 ncol-2]);
end
|
github | sailor01/GeodesicActiveContour-master | div.m | .m | GeodesicActiveContour-master/div.m | 189 | utf_8 | cfe9b6b6adf2917e2e3ff7db0fc02266 | % This MATLAB code demonstrates the calculation of the curvature for the level set
% evolution
function [ K ] = div( Nx, Ny )
[nx,~]=gradient(Nx);
[~,ny]=gradient(Ny);
K = nx + ny;
end
|
github | sailor01/GeodesicActiveContour-master | evolveLS.m | .m | GeodesicActiveContour-master/evolveLS.m | 1,133 | utf_8 | 3be3ba5f9999fbde6b9f5554d7a2d9fb | % This MATLAB code demonstrates the level set evolution for object tracking in videos
function [ phi ] = evolveLS( frame, phi, G, beta, alpha, lambda, epsilon, timestep, iterin )
frame = double(rgb2gray(frame));
Gframe = conv2(frame,G,'same'); % Convolving with a Gaussian
[Ix,Iy] = gradient(Gframe); % Calculate delta... |
github | rayzh2013/EEG-emotion-etector-master | myNeuralNetworkFunction.m | .m | EEG-emotion-etector-master/myNeuralNetworkFunction.m | 24,457 | utf_8 | 79827a2d990b01b4868d09748a71447b | function [Y,Xf,Af] = myNeuralNetworkFunction(X,~,~)
%MYNEURALNETWORKFUNCTION neural network simulation function.
%
% Generated by Neural Network Toolbox function genFunction, 06-Feb-2015 01:49:50.
%
% [Y] = myNeuralNetworkFunction(X,~,~) takes these arguments:
%
% X = 1xTS cell, 1 inputs over TS timsteps
% Each X... |
github | rayzh2013/EEG-emotion-etector-master | Emotion CLassification.m | .m | EEG-emotion-etector-master/Emotion CLassification.m | 1,321 | utf_8 | c85d040c05a66993d7bc40e22a66b0db | %% MATLAB Client
function Real_time_Processing_Solution
t = tcpip('127.0.0.1', 5204, 'NetworkRole', 'client');
t2 = tcpip('127.0.0.1', 5205, 'NetworkRole', 'client');
t3 = tcpip('127.0.0.1', 5206, 'NetworkRole', 'client');
t4 = tcpip('127.0.0.1', 5207, 'NetworkRole', 'client');
%fopen(t)
%fopen(t2)
%fopen(t3)
%fopen(t... |
github | rayzh2013/EEG-emotion-etector-master | Emo_Classification.m | .m | EEG-emotion-etector-master/Emo_Classification.m | 23,838 | utf_8 | 18ae3c2203e86616a296a9ea333f7419 | function [y1] = Emo_Classification(x1)
%MYNEURALNETWORKFUNCTION neural network simulation function.
%
% Generated by Neural Network Toolbox function genFunction, 06-Feb-2015 01:42:23.
%
% [y1] = myNeuralNetworkFunction(x1) takes these arguments:
% x = 43xQ matrix, input #1
% and returns:
% y = 8xQ matrix, output #... |
github | rayzh2013/EEG-emotion-etector-master | Emotion_CLassification.m | .m | EEG-emotion-etector-master/Emotion_CLassification.m | 1,314 | utf_8 | 30cef42909671e0d78a8f125465a96d7 | %% MATLAB Client
function Emotion_CLassification
t = tcpip('127.0.0.1', 5204, 'NetworkRole', 'client');
t2 = tcpip('127.0.0.1', 5205, 'NetworkRole', 'client');
t3 = tcpip('127.0.0.1', 5206, 'NetworkRole', 'client');
t4 = tcpip('127.0.0.1', 5207, 'NetworkRole', 'client');
%fopen(t)
%fopen(t2)
%fopen(t3)
%fopen(t4)
%fwr... |
github | rayzh2013/EEG-emotion-etector-master | Emo_Classification2.m | .m | EEG-emotion-etector-master/Emo_Classification2.m | 23,840 | utf_8 | 4f45536f6da990e200e90cae062537a6 | function [y1] = Emo_Classification(x1)
%MYNEURALNETWORKFUNCTION neural network simulation function.
%
% Generated by Neural Network Toolbox function genFunction, 06-Feb-2015 01:42:23.
%
% [y1] = myNeuralNetworkFunction(x1) takes these arguments:
% x = 43xQ matrix, input #1
% and returns:
% y = 8xQ matrix, output #... |
github | hrioan/Gesture-Recognition-master | exportData_Callback.m | .m | Gesture-Recognition-master/dataViewer/exportData_Callback.m | 2,129 | utf_8 | 3da192f01b415b458286e7711af35229 | % --- Executes on button press in exportData.
function exportData_Callback(hObject, eventdata, handles)
% hObject handle to exportData (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.text,'String','Working...... |
github | hrioan/Gesture-Recognition-master | dataViewer.m | .m | Gesture-Recognition-master/dataViewer/dataViewer.m | 10,200 | utf_8 | b0bdc0a7863c0327beae302d67d8a9f5 | function varargout = dataViewer(varargin)
% DATAVIEWER MATLAB code for dataViewer.fig
% DATAVIEWER, by itself, creates a new DATAVIEWER or raises the existing
% singleton*.
%
% H = DATAVIEWER returns the handle to a new DATAVIEWER or the handle to
% the existing singleton*.
%
% DATAVIEWER('CALL... |
github | hrioan/Gesture-Recognition-master | loadButton_Callback.m | .m | Gesture-Recognition-master/dataViewer/loadButton_Callback.m | 2,150 | utf_8 | 6229197480baafbf846fb32374c1327d | % --- Executes on button press in loadButton.
function [ handles ] = loadButton_Callback(hObject, eventdata, handles, filename, path)
% hObject handle to loadButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% filenam... |
github | haller-group/LCStool-master | cgStrain_stats.m | .m | LCStool-master/LCStool-1-0/cgStrain_stats.m | 1,849 | utf_8 | 3127a2f981ce7dd1f55d84d1a0957964 | % cgStrain_stats Cauchy-Green strain tensor statistics
%
% SYNTAX
% cgStrain_stats(cgStrain,cgStrainEigenvector,cgStrainEigenvalue)
function cgStrain_stats(cgStrain,cgStrainEigenvector,cgStrainEigenvalue)
%% Negative eigenvalues
fprintf('Number of negative eigenvalues: %u.\n',numel(find(cgStrainEigenvalue(:) < 0)))
... |
github | haller-group/LCStool-master | plot_along_arc_length.m | .m | LCStool-master/LCStool-1-0/plot_along_arc_length.m | 344 | utf_8 | 54aff5487550c5a9d419148ee3191777 | % plot_along_arc_length Plot value along curve as a function of curve length.
%
% SYNTAX
% hPlot = plot_along_arc_length(hAxes,position,value);
function hPlot = plot_along_arc_length(hAxes,position,value)
xD = diff(position(:,1));
yD = diff(position(:,2));
arcLength = [0; cumsum(sqrt(xD.^2 + yD.^2))];
hPlot = plot(h... |
github | haller-group/LCStool-master | equal_resolution.m | .m | LCStool-master/LCStool-1-0/equal_resolution.m | 415 | utf_8 | 2693705712f1f38fab4fe7715df4a8be | % Some LCS Tool calculations require that the resolution in X and Y be
% equal. This function calculates the y-resolution that gives grid point
% spacing that is as close as possible to grid point spacing in the
% x-direction
function [resolutionY,deltaX] = equal_resolution(domain,resolutionX)
deltaX = (domain(1,2) -... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.