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 | urbste/MLPnP_matlab_toolbox-master | extractA.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/extractA.m | 2,185 | utf_8 | 13ae6c28060717fe4500e5c7fffd82c0 | % 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 | urbste/MLPnP_matlab_toolbox-master | veccomplex.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/veccomplex.m | 3,006 | utf_8 | f9c6ce5e9906c2b3f5d39a6ed53616c6 | % 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 | urbste/MLPnP_matlab_toolbox-master | vec.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | sdinit.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | psdscale.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/psdscale.m | 6,141 | utf_8 | d6b8616345e5086c5e26c53ea7a16b13 | % 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 | urbste/MLPnP_matlab_toolbox-master | checkpars.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/checkpars.m | 5,983 | utf_8 | cab850e9f461f590a5dafa49bbaba500 | % 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 | urbste/MLPnP_matlab_toolbox-master | optstep.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/optstep.m | 6,305 | utf_8 | 48415e80b179e639152e1a6da3307dd2 | % [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 | urbste/MLPnP_matlab_toolbox-master | pretransfo.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/pretransfo.m | 12,320 | utf_8 | b696ed8c17798178167ef32da61fa239 | % [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 | urbste/MLPnP_matlab_toolbox-master | deninfac.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/deninfac.m | 3,918 | utf_8 | 503533718cba50772b20a1ec05ff62ec | % [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 | urbste/MLPnP_matlab_toolbox-master | eigK.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/eigK.m | 4,372 | utf_8 | 06d3bd415e6d53fd32cb95cbdc12ff37 | % [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 | urbste/MLPnP_matlab_toolbox-master | wrapPcg.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | tdet.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | ordmmdmex.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/ordmmdmex.m | 1,271 | utf_8 | 52e36ec5ff391ea9ae94aeabe2ec625a | % 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)
%
% This file ... |
github | urbste/MLPnP_matlab_toolbox-master | quadadd.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/quadadd.m | 1,820 | utf_8 | c572f57ef1c018be8ff6b54d32f1f68a | % [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)
%
% This file is part of SeDuMi... |
github | urbste/MLPnP_matlab_toolbox-master | vectril.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/vectril.m | 1,762 | utf_8 | 596076d71a5720b9d23f6c2af80d7169 | % y = vectril(x,K)
% VECTRIL converts "PSD" blocks to lower triangular form.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = vectril(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2... |
github | urbste/MLPnP_matlab_toolbox-master | partitA.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/partitA.m | 1,819 | utf_8 | ac14fb30f072acdffff699c73c39969a | % 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)
%
% This file is part of SeDuMi ... |
github | urbste/MLPnP_matlab_toolbox-master | psdinvjmul.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/psdinvjmul.m | 1,787 | utf_8 | 2f5dd1773e6936a7c8110592366f1204 | % 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)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksand... |
github | urbste/MLPnP_matlab_toolbox-master | getDAt.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/getDAt.m | 2,042 | utf_8 | 5003dccd008c5373ceb19926294a9cad | % [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 | urbste/MLPnP_matlab_toolbox-master | bwdpr1.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/bwdpr1.m | 1,834 | utf_8 | 9c24d885cc3170d12fbb75ca74edecb1 | % 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)
%
% This file is ... |
github | urbste/MLPnP_matlab_toolbox-master | frameit.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | getada1.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | sddir.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | bwblkslv.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/bwblkslv.m | 1,547 | utf_8 | 8392d4a8efb4ba647f3f5059fc90edc4 | % 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 | urbste/MLPnP_matlab_toolbox-master | sqrtinv.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/sqrtinv.m | 1,819 | utf_8 | 1d87c91e62f09b80ad5b80563b96d812 | % 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)
%
% This file is part of SeDuMi ... |
github | urbste/MLPnP_matlab_toolbox-master | vecsym.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/vecsym.m | 1,769 | utf_8 | 836318344fa94f06b78511242b1f98df | % 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)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyrigh... |
github | urbste/MLPnP_matlab_toolbox-master | makereal.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/makereal.m | 1,811 | utf_8 | 2a6f23ea7781f51d1b806b9a14c7f8e3 | % 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)
%
% This file is part of SeDuMi 1.1 by I... |
github | urbste/MLPnP_matlab_toolbox-master | Amul.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/Amul.m | 2,017 | utf_8 | 3aaf3bc6429b1b21f6f9c4d526ef9653 | % 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 | urbste/MLPnP_matlab_toolbox-master | stepdif.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | qblkmul.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/qblkmul.m | 1,854 | utf_8 | 6d0657e21b25ab28c73f188a12897063 | % 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 | urbste/MLPnP_matlab_toolbox-master | psdjmul.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/psdjmul.m | 1,879 | utf_8 | ecb7cb8f061c366336a3f25c0fb25188 | % z = psdmul(x,y, K)
% PSDMUL for full x,y. Computes (XY+YX)/2
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = psdjmul(x,y, K)
%
% This file is part of SeDuMi 1.3 by Imre Polik
% Copyright (C) 2005 McMaster University, Hamilton... |
github | urbste/MLPnP_matlab_toolbox-master | widelen.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/widelen.m | 4,536 | utf_8 | 7ad4c5e8a463c198e9e5bc466e5c5bf2 | % [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 | urbste/MLPnP_matlab_toolbox-master | psdeig.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/psdeig.m | 2,542 | utf_8 | bc17e014fe3b156a7abb2d2def46cf81 | % [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 | urbste/MLPnP_matlab_toolbox-master | sdfactor.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | maxstep.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/maxstep.m | 2,654 | utf_8 | db3c75d25c32a5a7d4faacb1fec04a1a | % 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 | urbste/MLPnP_matlab_toolbox-master | getada3.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/getada3.m | 2,058 | utf_8 | d49bb1a28bf96a590093e290a6d3a67d | % [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 | urbste/MLPnP_matlab_toolbox-master | mat.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | blkchol.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/blkchol.m | 2,546 | utf_8 | c68bccd002bc901358fe00cd2e2c0720 | % [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 | urbste/MLPnP_matlab_toolbox-master | psdfactor.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/psdfactor.m | 2,394 | utf_8 | 4b39d3f804a5c6dd20d084a82c1a41e3 | % [ux,ispos] = psdfactor(x,K)
% PSDFACTOR UX'*UX Cholesky factorization
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [ux,ispos] = psdfactor(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 ... |
github | urbste/MLPnP_matlab_toolbox-master | adendotd.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/adendotd.m | 1,833 | utf_8 | e21167ad58997c4f3bdd86d2433972f2 | % 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)
%
% This file is p... |
github | urbste/MLPnP_matlab_toolbox-master | qjmul.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | wregion.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/wregion.m | 8,078 | utf_8 | ce92b33341db85f802e7d9e5cd2a69d7 | % [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 | urbste/MLPnP_matlab_toolbox-master | ddot.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/ddot.m | 2,037 | utf_8 | 84d2f349adf12e8af949276642e7f8b7 | % 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 | urbste/MLPnP_matlab_toolbox-master | getdense.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/getdense.m | 4,750 | utf_8 | 148ac691260be32d5670b2a037c94119 | % [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 | urbste/MLPnP_matlab_toolbox-master | givensrot.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/givensrot.m | 1,725 | utf_8 | 9208cb8125b4fadfb9abc085d8b315db | % y = givensrot(gjc,g,x,K)
% GIVENSROT
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = givensrot(gjc,g,x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CA... |
github | urbste/MLPnP_matlab_toolbox-master | sparbwslv.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | cellK.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | prelp.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/conversion/prelp.m | 3,778 | utf_8 | 90dcf5c14b1c6445ecad52fc904fd1ec | % 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 | urbste/MLPnP_matlab_toolbox-master | feasreal.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | sdpa2vec.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | blk2vec.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | writesdp.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/conversion/writesdp.m | 4,727 | utf_8 | 7ee3825bacdd560c93d4b6b930c5796f | % 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 | urbste/MLPnP_matlab_toolbox-master | frompack.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | feascpx.m | .m | MLPnP_matlab_toolbox-master/gOp/SeDuMi_1_3 2/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 | urbste/MLPnP_matlab_toolbox-master | appendimages.m | .m | MLPnP_matlab_toolbox-master/ASPnP/appendimages.m | 461 | utf_8 | a7ad42558236d4f7bd90dc6e72631d54 | % im = appendimages(image1, image2)
%
% Return a new image that appends the two images side-by-side.
function im = appendimages(image1, image2)
% Select the image with the fewest rows and fill in enough empty rows
% to make it the same height as the other image.
rows1 = size(image1,1);
rows2 = size(image2,1);
if (... |
github | urbste/MLPnP_matlab_toolbox-master | PnP_Reproj_NLS_Matlab.m | .m | MLPnP_matlab_toolbox-master/ASPnP/PnP_Reproj_NLS_Matlab.m | 1,767 | utf_8 | 10261b578cc0cc01f64c72439bf7f95f | function [Rr tr] = PnP_Reproj_NLS_Matlab(U,u,R0,t0)
%to refine the column-triplet by using nonlinear least square
%it's much better than the fminunc used by CVPR12.
%there are three fractional formulations, anyone is equivalently good.
%there are two constrained formulations, yet neither is good.
%the reason is that:... |
github | urbste/MLPnP_matlab_toolbox-master | matrix2quaternion.m | .m | MLPnP_matlab_toolbox-master/ASPnP/matrix2quaternion.m | 2,010 | utf_8 | ad7a1983aceaa9953be167eddabb22ae | % MATRIX2QUATERNION - Homogeneous matrix to quaternion
%
% Converts 4x4 homogeneous rotation matrix to quaternion
%
% Usage: Q = matrix2quaternion(T)
%
% Argument: T - 4x4 Homogeneous transformation matrix
% Returns: Q - a quaternion in the form [w, xi, yj, zk]
%
% See Also QUATERNION2MATRIX
% Copyright (c) 2008 ... |
github | urbste/MLPnP_matlab_toolbox-master | ASPnP_V2.m | .m | MLPnP_matlab_toolbox-master/ASPnP/ASPnP_V2.m | 1,810 | utf_8 | c026dfb2094099da6ec6ceccacdc2472 | function [R0, t0, cost] = ASPnP_V2(U, u)
%
R = cat(3, rotx(pi/2), roty(pi/2), rotz(pi/2));
t = mean(U,2);
cost = inf;
C_est = [];
t_est = [];
for i = 1:3
% Make a random rotation
pp = R(:,:,i) * (U - repmat(t, 1, size(U,2)));
%case1
[C_est_i, t_est_i] = ASPnP_Case1_V2(pp, u);
%rotate bac... |
github | urbste/MLPnP_matlab_toolbox-master | quaternion2matrix.m | .m | MLPnP_matlab_toolbox-master/ASPnP/quaternion2matrix.m | 1,431 | utf_8 | 49448898df2a32720040da4eb82aced9 | % QUATERNION2MATRIX - Quaternion to a 4x4 homogeneous transformation matrix
%
% Usage: T = quaternion2matrix(Q)
%
% Argument: Q - a quaternion in the form [w xi yj zk]
% Returns: T - 4x4 Homogeneous rotation matrix
%
% See also MATRIX2QUATERNION, NEWQUATERNION, QUATERNIONROTATE
% Copyright (c) 2008 Peter Kovesi
... |
github | urbste/MLPnP_matlab_toolbox-master | p3p.m | .m | MLPnP_matlab_toolbox-master/p3p_code_final/p3p.m | 6,878 | utf_8 | d624eafb3c1568d6d9f7f7751a6cab47 | % Copyright (c) 2011, Laurent Kneip, ETH Zurich
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are met:
% * Redistributions of source code must retain the above copyright
% notice, this list of... |
github | urbste/MLPnP_matlab_toolbox-master | solveQuartic.m | .m | MLPnP_matlab_toolbox-master/p3p_code_final/solveQuartic.m | 2,592 | utf_8 | 74f88b5276461cd93fe0d00b39cd0b76 | % Copyright (c) 2011, Laurent Kneip, ETH Zurich
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are met:
% * Redistributions of source code must retain the above copyright
% notice, this list of... |
github | OpenWaterAnalytics/epanet-example-networks-master | nh2cl.m | .m | epanet-example-networks-master/msx-examples/Batch-NH2Cl/nh2cl.m | 2,326 | utf_8 | df91b63da638b7e7db9bdaad7fa25448 | function [t,y]=nh2cl(ph)
%Matlab code to verify NH2CL bacth model results of EPANET-MSX
%input argument: pH value
%output: t = time in hour
% y = matrix to store the time series of the species concentration
% y[:,j] is the time series vector of spcies with index j
% species index in the DAE systemn
%H... |
github | zinsmatt/StructureFromMotion-master | torr_unit2sphere.m | .m | StructureFromMotion-master/code/torr_unit2sphere.m | 575 | utf_8 | ff5aaca95792e2cc250b4fe118d1bc84 | % By Philip Torr 2002
% copyright Microsoft Corp.
function [a,b] = torr_unit2sphere(rot_axis)
% %convert rot_axis to spherical coords
% sin a sin b
% sin a cos b
% cos a
rot_axis = rot_axis/norm(rot_axis);
%normalize so second coordinate + ve
%rot_axis = rot_axis * sign(rot_axis(2));
a = acos(rot_axis(3... |
github | zinsmatt/StructureFromMotion-master | torr_triangulate.m | .m | StructureFromMotion-master/code/torr_triangulate.m | 1,372 | utf_8 | fae00b93ffeacd252c09620d63df8527 | % By Philip Torr 2002
% copyright Microsoft Corp.
%this function calculates the set of 3D points given matches and two projection matrices
%for this method to work best the matches must be corrected to lie on the epipolar lines
%P-i ith row of the P matrix then
%constraints are of the form x p_3^t - p_1 & y p_3... |
github | zinsmatt/StructureFromMotion-master | torr_linear_EtoPX.m | .m | StructureFromMotion-master/code/torr_linear_EtoPX.m | 4,403 | utf_8 | 72468f003e54de860e3dda2c72e05ed4 | % By Philip Torr 2002
% copyright Microsoft Corp.
%takes an essential matrix and a set of corrected matches, and outputs projection matrices, 3D points etc
%all via linear estimation; need camera calibration matrix too
function [P1,P2,R,t,rot_axis,rot_angle,g] = torr_linear_EtoPX(E,matches,C,m3)
%stage 1 g... |
github | zinsmatt/StructureFromMotion-master | torr_ls.m | .m | StructureFromMotion-master/code/torr_ls.m | 722 | utf_8 | 7c4c0bc1a34e1fcfbd3cf317115e4055 | % By Philip Torr 2002
% copyright Microsoft Corp.
%
% %designed for the good of the world by Philip Torr
% copyright Philip Torr and Microsoft Corp 2002
% orthogonal regression see
% @article{Torr97c,
% author="Torr, P. H. S. and Murray, D. W. ",
% title="The Development and Comparison of Rob... |
github | karaimer/camera-pipeline-white-balancing-experiment-master | general_cc.m | .m | camera-pipeline-white-balancing-experiment-master/ColorConstancy/general_cc.m | 3,050 | utf_8 | 22c2d001fd8a73a38eca87458096413a | % general_cc: estimates the light source of an input_image.
%
% Depending on the parameters the estimation is equal to Grey-Wolrd, Max-RGB, general Grey-World,
% Shades-of-Gray or Grey-Edge algorithm.
%
% SYNOPSIS:
% [white_R ,white_G ,white_B,output_data] = general_cc(input_data,njet,mink_norm,sigma,mask_im)
% ... |
github | karaimer/camera-pipeline-white-balancing-experiment-master | normalize.m | .m | camera-pipeline-white-balancing-experiment-master/ColorConstancy/normalize.m | 361 | utf_8 | b8213b1fd1409a252b98087255fb1194 |
function Y = normalize(X, min, max)
% Normalize the data into the range of 0 and 1 according to the name of the
% camera
% input:
% X: data needed to be normalized
% min: minimum value
% max: maximum value
% output:
% Y: data after normalizing
% Normalize the data X
X = double(X);
Y = (X - mi... |
github | Wiesen/Robotics-Estimation-and-Learning-master | occGridMapping.m | .m | Robotics-Estimation-and-Learning-master/2D Occupancy Grid Mapping/AssignmentWEEK3/occGridMapping.m | 1,672 | utf_8 | 1e30e43c6c1f9fd9ce0543be233bfaad | % Robotics: Estimation and Learning
% WEEK 3
%
% Complete this function following the instruction.
function myMap = occGridMapping(ranges, scanAngles, pose, param)
%% Parameters
% the number of grids for 1 meter.
myResol = param.resol;
% the initial map size in pixels
myMap = zeros(param.size);
... |
github | Wiesen/Robotics-Estimation-and-Learning-master | detectBall.m | .m | Robotics-Estimation-and-Learning-master/Color Learning and Target Detection/AssignmentWEEK1/detectBall.m | 1,313 | utf_8 | 395dd878f3e2f3573c1c707d1ea21202 | % Robotics: Estimation and Learning
% WEEK 1
%
% Complete this function following the instruction.
function [segI, loc] = detectBall(I)
% function [segI, loc] = detectBall(I)
%
% INPUT
% I 120x160x3 numerial array
%
% OUTPUT
% segI 120x160 numeric array
% loc 1x2 or 2x1 numeric array
%%%%%%%%%%%%%%%%... |
github | EoinDavey/Competitive-master | d08.m | .m | Competitive-master/AdventOfCode2021/d08_octave/d08.m | 2,282 | utf_8 | eca51b7f494841063e25532af674fa52 | 1; % Mark this as a script-file, not a function file (octave weirdness)
function cell = split2sets( l )
cell = strsplit(l, " ");
cell = cellfun(@unique, cell, "UniformOutput", false);
endfunction
function splt = splitInpLine( line )
splt = strsplit(line, " | ");
splt = cellfun(@split2sets, splt, "Unif... |
github | ihowat/setsm_postprocessing-master | boundaryAdjust.m | .m | setsm_postprocessing-master/boundaryAdjust.m | 4,292 | utf_8 | 376829e3e673a4e1a0fdce4d6ef23a33 | function boundaryAdjust(fileNames,varargin)
% boundaryAdjust adjust tile based on offsets with neighbors over buffers
%
% boundaryAdjust(fileNames) where fileNames is a cell of full filenames of
% tile files. Files must be named row_col_*.mat, where the row and col are
% the tile row and column numbers in the tile arra... |
github | ihowat/setsm_postprocessing-master | edgeFeather.m | .m | setsm_postprocessing-master/edgeFeather.m | 3,170 | utf_8 | 84c92b942f4233783b93659efa115329 | function W = edgeFeather(M0,M1,varargin)
% EDGEFEATHER get weights for merging two images with edge feathering
%
%W = edgeFeather(M0,M1,buff) where M0 and M1 are equally sized BW images
%with ones for data and zeros for no data. buff is the cutline buffer for
%merging - greater == means more overlap used for feather
b... |
github | ihowat/setsm_postprocessing-master | QCStrips.m | .m | setsm_postprocessing-master/QCStrips.m | 2,874 | utf_8 | caaf539387dedcf78e5b5d7dd67db162 | function QCStrips(stripDir,varargin)
outFile=[stripDir,'/qc.mat'];
system(['rm ',stripDir,'/._*']);
fileNames=dir([stripDir,'/*dem_browse.tif']);
fileNames=cellfun( @(x) [stripDir,'/',x], {fileNames.name},'uniformOutput',false);
fileNames=fileNames(:);
flag=zeros(size(fileNames));
x=cell(size(fileNames));
y=cell(... |
github | ihowat/setsm_postprocessing-master | QCStripsByTile.m | .m | setsm_postprocessing-master/QCStripsByTile.m | 14,534 | utf_8 | b8a120517c227bece02070e7dbe83389 | function QCStripsByTile(regionNum,varargin)
%% Argins
%regionNum='02'; % region number
tilefile = 'PGC_Imagery_Mosaic_Tiles_Antarctica.mat'; %PGC/NGA Tile definition file, required
arcdemfile= 'rema_tiles.mat'; % lists which tiles go to which regions, required
dbasefile = 'rema_strips_8m_wqc_cs2bias.mat'; % database ... |
github | ihowat/setsm_postprocessing-master | scenes2strips.m | .m | setsm_postprocessing-master/scenes2strips.m | 11,888 | utf_8 | 43d6e503811d77f86c6c1e33be32256c | function [X,Y,Z,M,O,trans,rmse,f]=scenes2strips(demdir,f)
%SCENES2STRIPS merge scenes into strips
%
% [x,y,z,m,o,trans,rmse,f]=scenes2strips(demdir,f) merges the
% scene geotiffs listed in cellstr f within directory demdir after
% ordering them by position. If a break in coverage is detected between
% scene n a... |
github | ihowat/setsm_postprocessing-master | DecimatePoly.m | .m | setsm_postprocessing-master/DecimatePoly.m | 7,059 | utf_8 | 59d47c972e3d1145b213349afa979c50 | function [C_out,i_rem]=DecimatePoly(C,opt)
% Reduce the complexity of a 2D simple (i.e. non-self intersecting), closed
% piecewise linear contour by specifying boundary offset tolerance.
% IMPORTANT: This function may not preserve the topology of the original
% polygon.
%
% INPUT ARGUMENTS:
% - C : N-b... |
github | rajul614/ResolutionTheoremSolving-master | CS4300_PL_Resolve.m | .m | ResolutionTheoremSolving-master/CS4300_PL_Resolve.m | 1,448 | utf_8 | f202bde8ee21c01221056b1194d7fec7 | function resolvents = CS4300_PL_Resolve(clause1,clause2)
% CS4300_PL_Resolve - resolution theorem prover
% On input:
% clause1 : 1rst conjuctive clause
% clause2 : 2nd conjuctive clause
% On output:
% resolvents : results of resolve
% Call:
% resolvents = CS4300_PL_Resolve([17,-2,5],[-17,5]);
% Author:
% Rajul Ramchand... |
github | rajul614/ResolutionTheoremSolving-master | CS4300_RTP.m | .m | ResolutionTheoremSolving-master/CS4300_RTP.m | 2,976 | utf_8 | a79b8bf9a2c5b8869846b2cb5155784c | function Sip = CS4300_RTP(sentences,thm,vars)
% CS4300_RTP - resolution theorem prover
% On input:
% clause (CNF data structure): array of conjuctive clauses
% (i).clauses
% each clause is a list of integers (- for negated literal)
% thm (CNF datastructure): a disjunctive clause to be tested
% vars (1xn vector): list o... |
github | MengLiuPurdue/find_densest_subgraph-master | max_density.m | .m | find_densest_subgraph-master/small_graph_test/max_density.m | 653 | utf_8 | 0a737e85e2fd52f22a72a295a9c10cbc | %find the subgraph with the maximum density in an undirected graph through brutal search
%the undirected graph is represented by an adjcent matrix A
%density is the maximum density and cut is the corresponding subgraph
function [density,cut]=max_density(A)
density=0;
[n,n]=size(A);
for i=0:(2^n-1)
temp=0;
a=bitg... |
github | MengLiuPurdue/find_densest_subgraph-master | readSMAT.m | .m | find_densest_subgraph-master/matlab_wrapper_sparse/readSMAT.m | 2,054 | utf_8 | df9a6fc0686543129dd465f7a5fb0991 | function A = readSMAT(filename)
% readSMAT reads an indexed sparse matrix representation of a matrix
% and creates a MATLAB sparse matrix.
%
% A = readSMAT(filename)
% filename - the name of the SMAT file
% A - the MATLAB sparse matrix
%
% David Gleich
% Copyright, Stanford University, 2005-2010
if (~exist(file... |
github | MengLiuPurdue/find_densest_subgraph-master | run_densest_subgraph.m | .m | find_densest_subgraph-master/6_node_test/run_densest_subgraph.m | 3,172 | utf_8 | a5045a1820edce666c0b310b580a1100 | function [S,density,algd] = run_densest_subgraph(A)
% Write output and run the commands
% assert(issymmetric(A));
% assert(~any(diag(A)));
mydir = fileparts(mfilename('fullpath'));
mygfile = fullfile(mydir,'run_dsubgraph.smat');
myoutfile = fullfile(mydir,'run-dsubgraph.out');
writeSMAT(mygfile, A);
status = system... |
github | MengLiuPurdue/find_densest_subgraph-master | max_density.m | .m | find_densest_subgraph-master/6_node_test/max_density.m | 633 | utf_8 | edf1d2d157f71e56c6930b8c4fafeeb5 | %find the subgraph with the maximum density in an undirected graph through brutal search
%the undirected graph is represented by an adjcent matrix A
%density is the maximum density and cut is the corresponding subgraph
function [density,cut]=max_density(A)
density=0;
for i=0:63
temp=0;
a=bitget(i,6:-1:1);
for... |
github | mhturner/MHT-Rieke-analysis-master | singleEpochPlusImagingTraces.m | .m | MHT-Rieke-analysis-master/JauiModel&TreeTools/epoch-tree-gui/singleEpochPlusImagingTraces.m | 4,170 | utf_8 | 3cea9f4f1fac67a40972ad2511c061d6 | function singleEpochPlusImagingTraces(epochTree, fig, doInit)
%Show info about one Epoch at at time, under given EpochTree
% benjamin.heasly@gmail.com
% 2 Feb. 2009
%MHT added imaging traces 20171025
import riekesuite.guitools.*;
if ~nargin && ~isobject(epochTree)
disp(sprintf('%s needs an EpochTree', mfilename... |
github | mhturner/MHT-Rieke-analysis-master | singleEpoch.m | .m | MHT-Rieke-analysis-master/JauiModel&TreeTools/epoch-tree-gui/singleEpoch.m | 3,631 | utf_8 | 8cd875fdf9621f2baef1745d10d5c0db | function singleEpoch(epochTree, fig, doInit)
%Show info about one Epoch at at time, under given EpochTree
% benjamin.heasly@gmail.com
% 2 Feb. 2009
import riekesuite.guitools.*;
if ~nargin && ~isobject(epochTree)
disp(sprintf('%s needs an EpochTree', mfilename));
return
end
if nargin < 2
disp(sprintf('%... |
github | mhturner/MHT-Rieke-analysis-master | rotavg.m | .m | MHT-Rieke-analysis-master/Utilities/imageAnalysisTools/rotavg.m | 514 | utf_8 | d6c4c1e17260944b706084b0a20b6979 | % rotavg.m - function to compute rotational average of (square) array
% by Bruno Olshausen
%
% function f = rotavg(array)
%
% array can be of dimensions N x N x M, in which case f is of
% dimension NxM. N should be even.
%
function f = rotavg(array)
[N N M]=size(array);
[X Y]=meshgrid(-N/2:N/2-1,-N/2:N/2-1);
[theta ... |
github | mhturner/MHT-Rieke-analysis-master | SpikeDetector.m | .m | MHT-Rieke-analysis-master/Utilities/SpikeTrainTools/SpikeDetector.m | 7,059 | utf_8 | 3a0849383ba6e1021cb2407051fba5f2 | function [SpikeTimes, SpikeAmplitudes, RefractoryViolations] = SpikeDetector(DataMatrix,varargin)
%SpikeDetector detects spikes in an extracellular / cell attached recording
% [SpikeTimes, SpikeAmplitudes, RefractoryViolations] = SpikeDetector(dataMatrix,varargin)
% RETURNS
% SpikeTimes: In datapoints. Cell a... |
github | mhturner/MHT-Rieke-analysis-master | fitCRF_cumGauss.m | .m | MHT-Rieke-analysis-master/Utilities/Curves&Stuff/fitCRF_cumGauss.m | 1,244 | utf_8 | e4e4e2699a7107896e9fc06386856689 | function res = fitCRF_cumGauss(contrast,response,params0)
% res = fitCRF_cumGauss(contrast,response,params0)
% Fitting wrapper for CRFcumGauss
LB = [0, -Inf, -Inf, -Inf]; UB = [Inf Inf Inf Inf];
fitOptions = optimset('MaxIter',1500,'MaxFunEvals',1000*length(LB),'Display','off');
[params, ~, ~]=lsqn... |
github | mhturner/MHT-Rieke-analysis-master | fitSpikeInputOutput.m | .m | MHT-Rieke-analysis-master/Utilities/Curves&Stuff/fitSpikeInputOutput.m | 1,080 | utf_8 | afeab1d724cfd7bf3e8aaa32461ac18c | function res = fitSpikeInputOutput(inputs,response,params0)
% res = fitSpikeInputOutput(inputs,response,params0)
% Fitting wrapper for SpikeOutput_cumGauss
LB = [0, -Inf, -Inf]; UB = [Inf Inf Inf];
fitOptions = optimset('MaxIter',1500,'MaxFunEvals',600*length(LB));
[params, ~, ~]=lsqnonlin(@errFun,... |
github | mhturner/MHT-Rieke-analysis-master | fitCRF_sigmoid.m | .m | MHT-Rieke-analysis-master/Utilities/Curves&Stuff/fitCRF_sigmoid.m | 1,096 | utf_8 | 563daf5d03284142d39a95ef38be209c | function res = fitCRF_sigmoid(contrast,response,params0)
% res = fitCRF_sigmoid(contrast,response,params0)
% Fitting wrapper for sigmoidCRF
LB = [0, -Inf 0 -Inf]; UB = [Inf Inf Inf Inf];
fitOptions = optimset('MaxIter',1500,'MaxFunEvals',600*length(LB),'Display','off');
[params, ~, ~]=lsqnonlin(@CR... |
github | mhturner/MHT-Rieke-analysis-master | freezeColors.m | .m | MHT-Rieke-analysis-master/Utilities/PlotTools/freezeColors.m | 9,753 | utf_8 | 611c1ec5ba6c9a145252ce43179845dd | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | mhturner/MHT-Rieke-analysis-master | getCellInfoFromEpochList.m | .m | MHT-Rieke-analysis-master/EpochListAnalysisFunctions/getCellInfoFromEpochList.m | 1,808 | utf_8 | cf9215f0e983f57a668c54fa0eeaec5d | function cellInfo = getCellInfoFromEpochList(epochList)
% res = getCellInfoFromEpochList(epochList)
% MHT 5/17/16
ip = inputParser;
ip.addRequired('epochList',@(x)isa(x,'edu.washington.rieke.symphony.generic.GenericEpochList'));
ip.parse(epochList);
epochList = ip.Results.epochList;
firstCellID = char(epochList.elemen... |
github | mhturner/MHT-Rieke-analysis-master | fitNormcdfNonlinearity.m | .m | MHT-Rieke-analysis-master/Modeling/CSmodels/fitNormcdfNonlinearity.m | 972 | utf_8 | d0891f99f64656159e191abc8c560459 | function res = fitNormcdfNonlinearity(x,response,params0)
%res is params for fxn normcdfNonlinearity
%params is [alpha, beta, gamma, epsilon]
% % params0=[max(resp), mean(diff(resp)), 0, 0]';
LB = [-Inf -Inf -Inf -Inf]; UB = [Inf Inf Inf max(response(:))];
fitOptions = optimset('MaxIter',1500,'MaxFunEvals',600*length... |
github | mhturner/MHT-Rieke-analysis-master | fitCSModel_SharedNL.m | .m | MHT-Rieke-analysis-master/Modeling/CSmodels/fitCSModel_SharedNL.m | 1,342 | utf_8 | 9e876de9c0cee9c52c7e70d87c160858 | function res = fitCSModel_SharedNL(x,y,z_data,params0)
%fits summed nonlinearity, r = f(aX + Y)
%res is params for fxn summedNLin
%params is [a, alpha, beta, gamma, epsilon]
% % params0=[2, max(z_data), mean(diff(z_data))/mean(diff(x+y)), 0, 0]';
LB = [0 -Inf -Inf -Inf -Inf]; UB = [Inf Inf Inf Inf max(z_data(:))];
fi... |
github | mhturner/MHT-Rieke-analysis-master | fitNLinearity_2D.m | .m | MHT-Rieke-analysis-master/Modeling/CSmodels/fitNLinearity_2D.m | 1,628 | utf_8 | 52a9f02cbd7631ed449309d0728696e9 | function res = fitNLinearity_2D(x,y,z_data,beta0)
%fits 2D nonlinearity with smooth surface which is a modified bivariate
%cumulative normal distribution
% alpha*C(mu,sigma)+epsilon
% where C is mvncdf() fxn
%x and y define axes 1 and 2 (bins centers, basically)
%z_data is an x by y matrix of response values
%beta... |
github | mhturner/MHT-Rieke-analysis-master | fitCSModel_ThreeNL.m | .m | MHT-Rieke-analysis-master/Modeling/CSmodels/fitCSModel_ThreeNL.m | 2,086 | utf_8 | 9c411b5c3487657c8d79a661de2f4f6f | function res = fitCSModel_ThreeNL(C,S,response,params0)
%Takes in binned generator signals for Center and Surround, along with
%corresponding response - same input as fitting joint model
%fits thee-NL center-surround model: R = nShared[nC(hC*C) + nS(hS*S)]
%where nC, nS, and nShared are modified cumulative gaussian NLi... |
github | mhturner/MHT-Rieke-analysis-master | fitCSModel_IndependentNL.m | .m | MHT-Rieke-analysis-master/Modeling/CSmodels/fitCSModel_IndependentNL.m | 1,794 | utf_8 | f423a43fd62fca9366df40b55b3cb726 | function res = fitCSModel_IndependentNL(C,S,response,params0)
%Takes in binned generator signals for Center and Surround, along with
%corresponding response - same input as fitting joint model
%fits independent center-surround model: R = nC(hC*C) + nS(hS*S)
%where nC and nS are modified cumulative gaussian NLinearities... |
github | rohitrango/CS251-master | backward_solve_3.m | .m | CS251-master/lab4/inlab/cs251_group37/lab01_group37_final/backward_solve_3.m | 562 | utf_8 | d115b4d0d808cf01e9b6bbd899102689 | %Function for backward solving 3*3 matrix
function y = backward_solve_3(x)
b = x'(:); % Convert input matrix to a vector
load Apush; % Load the matrix which shows the lights toggled on pressing a specific button.
AdjA = round(det(A)*inv(A)); % Calculating the adjoint of the above matrix
z = mod(-AdjA*b,2); ... |
github | rohitrango/CS251-master | backward_solve.m | .m | CS251-master/lab4/inlab/cs251_group37/lab01_group37_final/backward_solve.m | 1,988 | utf_8 | 9983b121aff2924a4fa35ad0460d39cd | % function res = backward_solve(x)
% b = x(:);
% m = size(x,1);
% n = size(x,2);
% A = zeros(m*n);
% % generating the matrix A, when boxes are numbered vertically
% %%% NOTE: we have a faster version to calculate A, using no for loop. Written explanation is difficult.
% %%% But we can explain verbally. It... |
github | rohitrango/CS251-master | backward_solve_3.m | .m | CS251-master/lab1/Outlab Final Submission/backward_solve_3.m | 562 | utf_8 | d115b4d0d808cf01e9b6bbd899102689 | %Function for backward solving 3*3 matrix
function y = backward_solve_3(x)
b = x'(:); % Convert input matrix to a vector
load Apush; % Load the matrix which shows the lights toggled on pressing a specific button.
AdjA = round(det(A)*inv(A)); % Calculating the adjoint of the above matrix
z = mod(-AdjA*b,2); ... |
github | rohitrango/CS251-master | backward_solve.m | .m | CS251-master/lab1/Outlab Final Submission/backward_solve.m | 1,988 | utf_8 | 9983b121aff2924a4fa35ad0460d39cd | % function res = backward_solve(x)
% b = x(:);
% m = size(x,1);
% n = size(x,2);
% A = zeros(m*n);
% % generating the matrix A, when boxes are numbered vertically
% %%% NOTE: we have a faster version to calculate A, using no for loop. Written explanation is difficult.
% %%% But we can explain verbally. It... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.