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 | microsoft/ADBench-master | adimat_opdiff_mult_left.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_mult_left.m | 713 | utf_8 | 4aa028cb6f24d4dad9a0e450045e604f | % function d_res = adimat_diff_mult_left(val1, g_val2, val2)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val2 = adimat_opdiff_mult_lef... |
github | microsoft/ADBench-master | createFullGradients.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/createFullGradients.m | 1,483 | utf_8 | 51276124bda318cf2d0e694d40bb9524 | % function [varargout]= createFullGradients(varargin)
%
% Compute the total number ndd of components of all n input arguments
% and create n gradient objects where each leading dimension of float
% components represents one of the ndd derivative directions. Also
% store the number ndd with option('ndd', ndd).
%
% This ... |
github | microsoft/ADBench-master | createZeroGradients.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/createZeroGradients.m | 1,734 | utf_8 | 98890c1b5ca2246d089f4fd5213ce251 | % function [varargout]= createZeroGradients(ndd, varargin)
%
% Save the number ndd with option('ndd', ndd) and create a zero
% gradient object for each input argument, using d_zeros.
%
% This function only works with float, cell, or struct objects as
% input. If you have inputs of other type, you have to set
% option('... |
github | microsoft/ADBench-master | adimat_opdiff_ediv_right.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_ediv_right.m | 489 | utf_8 | 47c0ff65b6629636558e77125bf3247b | % function d_res = adimat_opdiff_ediv_right(d_val1, val1, val2)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val1 = adimat_opdiff_ediv_... |
github | microsoft/ADBench-master | adimat_opdiff_esol_left.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_esol_left.m | 434 | utf_8 | f43576871de74517d2ea75329157046e | % function d_res = adimat_opdiff_esol_left(val1, d_val2, val2)
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_res = adimat_opdiff_esol_left(val1, d_val2, val2)
d_res = ad... |
github | microsoft/ADBench-master | adimat_opdiff_etrans.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_etrans.m | 393 | utf_8 | dc73ccb926922296468e8faffc44283e | % function d_res = adimat_opdiff_etrans(d_val, val)
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_res = adimat_opdiff_etrans(d_val, ~)
d_res = permute(d_val, [1 3 2]);
e... |
github | microsoft/ADBench-master | admSetNDDOnLabs.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/admSetNDDOnLabs.m | 402 | utf_8 | 801ccc321589d7baaa98992aa364dffa | % function r = admSetNDDOnLabs(ndd)
%
% This is a helper function to propagate the NDD to all labs. This
% is in a separate function because the Octave parser does not
% understand the spmd construct.
%
function admSetNDDOnLabs(ndd)
% fprintf(admLogFile('main'), 'setting the NDD on all the labs\n');
spmd
option... |
github | microsoft/ADBench-master | adimat_opdiff_emult_right.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_emult_right.m | 489 | utf_8 | 8b129b88d4ecb0e0b08f38f4b1cd40b3 | % function d_res = adimat_opdiff_emult_right(d_val1, val1, val2)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val1 = adimat_opdiff_emul... |
github | microsoft/ADBench-master | adimat_opdiff_epow_left.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_epow_left.m | 778 | utf_8 | 33d372ef660bef5bc88cbc9d135f02d2 | % function d_res = adimat_opdiff_epow_left(val1, d_val2, val2)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val2 = adimat_opdiff_epow_l... |
github | microsoft/ADBench-master | adimat_opdiff_subsref.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_subsref.m | 1,459 | utf_8 | ea4f0949a3759921b858498423d59516 | % function r = adimat_diff_subsref(d_val, sel)
%
% Copyright 2011-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val = adimat_opdiff_subsref(d_val, sel)
last = sel(end);
if last.type == '... |
github | microsoft/ADBench-master | adimat_opdiff_ediv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_ediv.m | 549 | utf_8 | dce7c1b616c003df995a9dec58033b8e | % function [d_res res] = adimat_opdiff_ediv(d_a, a, d_b, b)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function [d_a res] = adimat_opdiff_ediv(d... |
github | microsoft/ADBench-master | adimat_opdiff_emult_left.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_emult_left.m | 486 | utf_8 | 2e2d3990ee0455a0700db0a2bc11f709 | % function d_res = adimat_opdiff_emult_left(val1, d_val2, val2)
%
% Copyright 2014 Johannes Willkomm
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function d_val2 = adimat_opdiff_emult... |
github | microsoft/ADBench-master | adimat_opdiff_div.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_div.m | 1,081 | utf_8 | dfb40693f162bff116875a6a51d1a105 | % function r = adimat_opdiff_div(d_val1, val1, d_val2, val2)
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2010-2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function d_res = adimat_opdiff_div(d_val1, val1, d_val2, val2)
szv2 = size(val2);
i... |
github | microsoft/ADBench-master | adimat_opdiff_subsasgn_old.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_subsasgn_old.m | 1,737 | utf_8 | 21a56ef3388211a889bc85cd0c5ceac9 | %
% function r = adimat_opdiff_subsasgn(d_val, sel, rhs)
%
% Copyright 2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function r = adimat_opdiff_subsasgn(d_val, sel, rhs)
last = sel(end);
r = d_val;... |
github | microsoft/ADBench-master | adimat_opdiff_pow_right.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_opdiff_pow_right.m | 1,417 | utf_8 | 4ecef0c1dde3bb48432695cc1117d60f | % function r = adimat_diff_pow_right(g_val1, val1, val2)
%
% Copyright 2010,2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function r = adimat_opdiff_pow_right(g_val1, val1, val2)
if isscalar(val1) && i... |
github | microsoft/ADBench-master | adimat_fdiff_vunary.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/vector_directderivs/adimat_fdiff_vunary.m | 638 | utf_8 | e6b7a905a744076a583483bb68181130 | % function [d_res res] = adimat_fdiff_vunary(d_x, x, dpfun)
%
% Compute derivative d_res and function result res of unary vector
% function whos diagonal partial derivative is returned by dpfun(x).
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Comput... |
github | microsoft/ADBench-master | createSeededGradientsRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/createSeededGradientsRev.m | 1,249 | utf_8 | f50219d02da91232601b1df221444fe0 | % function varargout = createSeededGradientsRev(seedMatrix, varargin)
% this simply calls createSeededGradientsFor(seedMatrix', varargin)
%
% see also createFullGradients, createSeededGradientsFor
%
% This file is part of the ADiMat runtime environment, and belongs
% to the opt_derivclass derivative class.
%
% Copyri... |
github | microsoft/ADBench-master | createSeededGradientsFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/createSeededGradientsFor.m | 1,786 | utf_8 | bee7919b53339a15a54a2c45b816c4cd | % function varargout = createSeededGradientsFor(seedMatrix, varargin)
%
% see also createFullGradients, createSeededGradientsRev
%
% This file is part of the ADiMat runtime environment, and belongs
% to the opt_derivclass derivative class.
%
% Copyright 2009,2010 Johannes Willkomm, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | admJacFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/admJacFor.m | 964 | utf_8 | 5e364a8c1824f30b1fe931a8adf4b505 | % function Jac = admJacFor(varargin)
%
% This file is part of the ADiMat runtime environment, and belongs
% to the opt_derivclass derivative class.
%
% Copyright 2014 Johannes Willkomm
% Copyright 2009-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scie... |
github | microsoft/ADBench-master | getdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/getdd.m | 397 | utf_8 | f810ac594b89e13f5c1aa388eaf4815d | %
% function [derivative] = getdd(obj, index)
% get the derivative directions ind from derivative object obj
%
% Copyright 2010 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function varargout = getdd(obj... |
github | microsoft/ADBench-master | admComputeDerivFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/admComputeDerivFor.m | 3,731 | utf_8 | 86aaf8dd136a673432cf7cdea3f57f38 | % function [Jacobian, varargout] = ...
% admComputeDerivFor(diffFunction, seedMatrix, ...
% independents, dependents, fNargout, ...
% admOpts, varargin)
%
% see also admDiffRev, admDiffVFor, admTransform, createFullGradients,
% createSeededGradients, admJacFor, admOp... |
github | microsoft/ADBench-master | admComputeDerivRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/admComputeDerivRev.m | 2,079 | utf_8 | a91bdb34884651087abbb1c1c97f8bb4 | % function [Jacobian, varargout] = ...
% admComputeDerivRev(diffFunction, seedMatrix, ...
% independents, dependents, ...
% functionResults, admOpts, varargin)
%
% see also admDiffFor, admDiffVFor, admTransform, createFullGradients,
% createSeededGradients, admJac... |
github | microsoft/ADBench-master | admJacRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/admJacRev.m | 967 | utf_8 | f809c2d7508086492dfa376521f2ec6e | % function Jac = admJacRev(varargin)
%
% This file is part of the ADiMat runtime environment, and belongs
% to the opt_derivclass derivative class.
%
% Copyright 2014 Johannes Willkomm
% Copyright 2009-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scie... |
github | microsoft/ADBench-master | fliplr.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/fliplr.m | 208 | utf_8 | afd057e55b0f2ee230f8adb783a73825 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = fliplr(obj)
obj = flipdim(obj, 2);
end
% $Id: fliplr.m 4344 2014-05-24 07:17:54Z willkomm $
|
github | microsoft/ADBench-master | uplus.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/uplus.m | 217 | utf_8 | 69ab3d95f7a2c3bea0fa4eaafe4ba475 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = uplus(obj)
obj = unopFlat(obj, @uplus);
end
% $Id: uplus.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | uminus.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/uminus.m | 220 | utf_8 | 3a4196b29b933abc8ae5e236e6947b8a | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = uminus(obj)
obj = unopFlat(obj, @uminus);
end
% $Id: uminus.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | get.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/get.m | 449 | utf_8 | 070d10b31c964925184cc29840b12cdb | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function val = get(obj, name)
switch name
case 'direct'
dirs = cell(obj.m_ndd, 1);
for i=1:obj.m_ndd
dirs{i} = admGetDD(obj, i);
end
val = [dirs{:}];
case 'size'
val = size(obj);
case ... |
github | microsoft/ADBench-master | ifft.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ifft.m | 660 | utf_8 | 89c6309d05679bc1fc671a7551f474f6 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = ifft(obj, n, k, varargin)
mode = 'nonsymmetric';
if nargin > 1 && ischar(varargin{end})
mode = varargin{end};
varargin = varargin(1:end-1);
end
if length(varargin) < 1
n = [];
else
... |
github | microsoft/ADBench-master | eq.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/eq.m | 211 | utf_8 | 8e3da476523443e8149f44c110a937c7 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = eq(obj, v)
res = cmpop(obj, v, @eq);
end
% $Id: eq.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | cmpop.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/cmpop.m | 437 | utf_8 | dcb2a9962c5422c02929929cf7af484e | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = cmpop(obj, right, handle)
if isa(obj, 'arrdercont')
if isa(right, 'arrdercont')
res = handle(admGetDD(obj, 1), admGetDD(right, 1));
else
res = handle(admGetDD(obj, 1), right);
... |
github | microsoft/ADBench-master | cumsum.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/cumsum.m | 395 | utf_8 | 48673121312f56c5b0a35cf18e62b79c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = cumsum(obj, k)
if nargin < 2
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = cumsum(getder(obj, k), k);
obj.m_size = computeSize(obj);
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_s... |
github | microsoft/ADBench-master | tan.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/tan.m | 211 | utf_8 | 97e0264132bed02e625fcb7d3f2ca3cb | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = tan(obj)
obj = unopFlat(obj, @tan);
end
% $Id: tan.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | unopFlat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/unopFlat.m | 249 | utf_8 | a4189857256340910e525ffb78aa9717 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = unopFlat(obj, handle, varargin)
obj.m_derivs = handle(obj.m_derivs);
end
% $Id: unopFlat.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | toStruct.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/toStruct.m | 307 | utf_8 | 8ae6240dbe9fa5a696f6e7a81db4c21b | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = toStruct(obj)
res.m_derivs = obj.m_derivs;
res.m_ndd = obj.m_ndd;
res.m_size = obj.m_size;
res.className = 'arrdercont';
end
% $Id: toStruct.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | timesdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/timesdd.m | 228 | utf_8 | 89b06b5258757fed641c479cd327a723 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = timesdd(obj, right)
obj = binopFlatdd(obj, right, @times);
end
% $Id: timesdd.m 4392 2014-06-03 07:41:31Z willkomm $
|
github | microsoft/ADBench-master | minusdv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/minusdv.m | 233 | utf_8 | b9e8a3f19f7e7796dbb472ad862012cf | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = minusdv(obj, right)
obj = binopFlatdv(obj, right, @minus);
end
% $Id: minusdv.m 4393 2014-06-03 08:18:50Z willkomm $
|
github | microsoft/ADBench-master | call.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/call.m | 584 | utf_8 | 3829d75667bad22844e752c95f1106e2 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = call(handle, varargin)
which = cellfun(@isobject, varargin);
obj = varargin{which};
if ismember(func2str(handle), methods(obj))
obj = handle(varargin{:});
else
obj = unopLoop(obj, @(dd, vara... |
github | microsoft/ADBench-master | callm.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/callm.m | 682 | utf_8 | dd90aa29bffd0b1f9219a8a56d325293 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function varargout = callm(handle, varargin)
nin= nargin-1;
inp= cell(nin, 1);
outp= cell(nargout, 1);
obj = varargin{1};
for i=1:obj.m_ndd
for k=1:nin
inp{k} = admGetDD(varargin{k}, i);
... |
github | microsoft/ADBench-master | reshape.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/reshape.m | 382 | utf_8 | 51281dd26c2972cf7cf86444458e85fb | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = reshape(obj, varargin)
epos = cellfun('isempty', varargin);
if any(epos)
eppos = find(epos);
varargin{eppos} = prod(obj.m_size) ./ prod(cat(1, varargin{~epos}));
end
obj.m_size = [varargin{:... |
github | microsoft/ADBench-master | subsasgn_old.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/subsasgn_old.m | 2,385 | utf_8 | 7a0b8d7be28d019c6c3f1f329ad6929c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = subsasgn_old(obj, ind, rhs)
switch ind(1).type
case '()'
subs = ind(1).subs;
dind = ind;
dind(1).subs = [ subs {':'}];
if isa(rhs, 'arrdercont')
ndd = rhs.m_ndd;
rhsderivs =... |
github | microsoft/ADBench-master | transpose.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/transpose.m | 358 | utf_8 | bad253ee2797bde1a1fda62e37946f40 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = transpose(obj)
dds = permute(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), [2 1 3]);
obj.m_derivs = reshape(dds, [prod(obj.m_size) obj.m_ndd]);
obj.m_size = fliplr(obj.m_size);
end
% $Id: transpose.m... |
github | microsoft/ADBench-master | mrdivide.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/mrdivide.m | 524 | utf_8 | 8aa5144451d7f27834dd4aa90724b831 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = mrdivide(obj, right)
if isobject(right)
warning('why here? This probably shows a bug');
obj = binopLoop(obj, right, @mrdivide);
else
if isscalar(right)
obj = binopFlat(obj, right, @rdi... |
github | microsoft/ADBench-master | real.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/real.m | 214 | utf_8 | b31357aa4bcdf7dee3594c803be45a11 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = real(obj)
obj = unopFlat(obj, @real);
end
% $Id: real.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | end.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/end.m | 272 | utf_8 | dd55564a174431014abfb212192326ef | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = end(obj, k, n)
if k < n
res = obj.m_size(k);
else
res = prod(obj.m_size(k:end));
end
end
% $Id: end.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | binopLoop.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/binopLoop.m | 1,832 | utf_8 | 4b04ac2bd23f26f84c514deefa1f6424 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function res = binopLoop(obj, right, handle)
if isa(obj, 'arrdercont')
if isa(right, 'arrdercont')
if obj.m_ndd > 0
dd1 = reshape(obj.m_derivs(:,1), obj.m_size);
dd2 = reshape(right.m_derivs(:,... |
github | microsoft/ADBench-master | imag.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/imag.m | 214 | utf_8 | 7ec6cc74b4db1250f3d8e3a9da1a0d4b | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = imag(obj)
obj = unopFlat(obj, @imag);
end
% $Id: imag.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | subsasgn.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/subsasgn.m | 5,015 | utf_8 | 5d5ea4a93fa87a014f12a29e0c6d5768 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = subsasgn(obj, ind, rhs)
switch ind(1).type
case '()'
subs = ind(1).subs;
if isa(obj, 'arrdercont')
sz = obj.m_size;
else
obj = arrdercont([]);
sz = obj.m_size;
end
... |
github | microsoft/ADBench-master | unopLoopWO.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/unopLoopWO.m | 483 | utf_8 | 2d114fc593b58be1fd05f06297d4ddff | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = unopLoopWO(handle, wo, varargin)
obj = varargin{wo};
res = cell(obj.m_ndd, 1);
sz = obj.m_size;
for i=1:obj.m_ndd
dd1 = reshape(obj.m_derivs(:,i), sz);
dd = handle(varargin{1:wo-1}, dd1, var... |
github | microsoft/ADBench-master | sqrt.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/sqrt.m | 214 | utf_8 | 0f7689aafcc91460dcc7f0ba8afa7087 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = sqrt(obj)
obj = unopFlat(obj, @sqrt);
end
% $Id: sqrt.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | rot90.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/rot90.m | 394 | utf_8 | 696171f9ff924237656724700e8c1497 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = rot90(obj, k)
if nargin < 2
k = 1;
end
k = mod(k, 4);
if k < 0, k = k + 4; end
switch k
case 0
case 1
obj = flipud(obj.');
case 2
obj = flipud(fliplr(obj));
case 3
obj = fli... |
github | microsoft/ADBench-master | minusdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/minusdd.m | 233 | utf_8 | e5b460076a4f8f2b4336459107b181d0 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = minusdd(obj, right)
obj = binopFlatdd(obj, right, @minus);
end
% $Id: minusdd.m 4393 2014-06-03 08:18:50Z willkomm $
|
github | microsoft/ADBench-master | exp.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/exp.m | 211 | utf_8 | 76172920e289e66753b01cbbd01ed19a | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = exp(obj)
obj = unopFlat(obj, @exp);
end
% $Id: exp.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | zero.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/zero.m | 225 | utf_8 | da95e6cfac0c84f686e17ea17783895f | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = zero(obj, val)
obj = obj.init(zeros(size(val)));
end
% $Id: zero.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | linsolve.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/linsolve.m | 962 | utf_8 | 0cf01616dc5bc0f858fd2b74cce31350 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function res = linsolve(obj, right, varargin)
if isobject(obj)
warning('why here?')
res = binopLoop(obj, right, @mldivide);
else
if nargin > 2
opts = varargin{1};
else
opts = struct();
... |
github | microsoft/ADBench-master | times.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/times.m | 232 | utf_8 | 8116bd81aaeed87edbf0e7b3fc7564b2 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = times(obj, right)
obj = binopFlat(obj, right, @times);
end
% $Id: times.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | timesddes.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/timesddes.m | 234 | utf_8 | 968d83be012a26dfcceccc7ef1851942 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = timesddes(obj, right)
obj = binopFlatddes(obj, right, @times);
end
% $Id: timesddes.m 4393 2014-06-03 08:18:50Z willkomm $
|
github | microsoft/ADBench-master | mean.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/mean.m | 389 | utf_8 | eb29bbf095d5797f8fa43a29de39595c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = mean(obj, k)
if nargin < 2
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = mean(getder(obj, k), k);
obj.m_size = computeSize(obj);
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_size)... |
github | microsoft/ADBench-master | fft.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/fft.m | 426 | utf_8 | 3108e91c03d4e063db6e78dd34ab7f8c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = fft(obj, n, k)
if nargin < 2
n = [];
end
if nargin < 3
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = fft(getder(obj, k), n, k);
obj.m_size = computeSize(obj);
obj.m_derivs = r... |
github | microsoft/ADBench-master | ctranspose.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ctranspose.m | 405 | utf_8 | 4400b78415a34957670131b0cce4245c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = ctranspose(obj)
dds = permute(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), [2 1 3]);
if ~isreal(dds)
dds = conj(dds);
end
obj.m_derivs = reshape(dds, [prod(obj.m_size) obj.m_ndd]);
obj.m_siz... |
github | microsoft/ADBench-master | le.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/le.m | 211 | utf_8 | f5c7324e2a54673af8d7fed31b2f86a2 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = le(obj, v)
res = cmpop(obj, v, @le);
end
% $Id: le.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | toDouble.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/toDouble.m | 515 | utf_8 | b56eb7128090f10f34462b148dd2cc33 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function val = toDouble(obj)
if isobject(obj.m_derivs{1})
nsz = [1 size(toDouble(obj.m_derivs{1}))];
vals = cellfun(@(x) reshape(toDouble(x), nsz), obj.m_derivs, 'UniformOutput', false);
else
nsz = [1... |
github | microsoft/ADBench-master | flipud.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/flipud.m | 208 | utf_8 | 9c718790d365524272b309a21b66ecc4 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = flipud(obj)
obj = flipdim(obj, 1);
end
% $Id: flipud.m 4344 2014-05-24 07:17:54Z willkomm $
|
github | microsoft/ADBench-master | plusdv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/plusdv.m | 223 | utf_8 | f5e7a58cabafaddfbe1d39dfe25c3cd4 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = plus(obj, right)
obj = binopFlatdv(obj, right, @plus);
end
% $Id: plusdv.m 4392 2014-06-03 07:41:31Z willkomm $
|
github | microsoft/ADBench-master | numel.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/numel.m | 479 | utf_8 | 8ff013be1c2362af8216995bcaf4324c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = numel(obj, varargin)
% fprintf('arrdercont.numel: %s\n', num2str(size(obj)));
% disp(varargin);
if nargin < 2
res = 1;
return
end
if (ischar(varargin{1}) && (varargin{1}==':'))
res ... |
github | microsoft/ADBench-master | binopFlat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/binopFlat.m | 1,212 | utf_8 | 9867445937ea1deabc5d97e22e9a5ceb | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = binopFlat(obj, right, handle)
obj_sz = size(obj);
isc_obj = prod(obj_sz) == 1;
isc_right = prod(size(right)) == 1;
if isobject(obj)
if isc_obj
dd1 = reshape(obj.m_derivs, [ones(1,length(si... |
github | microsoft/ADBench-master | minusddes.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/minusddes.m | 239 | utf_8 | 86239f098840bf59d5d67f7d2b28b3b9 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = minusddes(obj, right)
obj = binopFlatddes(obj, right, @minus);
end
% $Id: minusddes.m 4393 2014-06-03 08:18:50Z willkomm $
|
github | microsoft/ADBench-master | ldivide.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ldivide.m | 238 | utf_8 | 0a423abccf02cad54f4011463f7df126 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = ldivide(obj, right)
obj = binopFlat(obj, right, @ldivide);
end
% $Id: ldivide.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | isreal.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/isreal.m | 222 | utf_8 | 800f220232ab230c36c777e88ee2574d | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = isreal(obj)
res = isreal(admGetDD(obj, 1));
end
% $Id: isreal.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | sum.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/sum.m | 386 | utf_8 | 534b4ca9630b0f112274c1fdf25383c3 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = sum(obj, k)
if nargin < 2
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = sum(getder(obj, k), k);
obj.m_size = computeSize(obj);
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_size) o... |
github | microsoft/ADBench-master | callwo.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/callwo.m | 439 | utf_8 | c81fe81191c9758d1999d04e887b9461 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = callwo(handle, varargin)
wo = find(cellfun(@isobject, varargin));
cobj = varargin{wo};
if ismember(func2str(handle), methods(cobj))
obj = handle(varargin{:});
else
obj = unopLoopWO(handle, w... |
github | microsoft/ADBench-master | full.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/full.m | 214 | utf_8 | e1246347507a071134928e4bc5733e92 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = full(obj)
obj = unopLoop(obj, @full);
end
% $Id: full.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | ge.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ge.m | 211 | utf_8 | 8bd1614022c322263c2e258615b38c15 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = ge(obj, v)
res = cmpop(obj, v, @ge);
end
% $Id: ge.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | vertcat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/vertcat.m | 234 | utf_8 | fdae91ed5e418129ea44e72b4cd799bc | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = vertcat(obj, varargin)
obj = cat(1, obj, varargin{:});
end
% $Id: vertcat.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | repmat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/repmat.m | 464 | utf_8 | 25e87fb357b8ff9706ee34e9da3a6cda | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = repmat(obj, varargin)
repv = [varargin{:}];
repvd = [repv 1];
obj.m_derivs = repmat(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), repvd);
obj.m_size = [obj.m_size ones(1, length(repv)-length(obj.m_... |
github | microsoft/ADBench-master | complex.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/complex.m | 474 | utf_8 | 11fbf374605856773cd3401ec7ea4a78 | % This file is part of the ADiMat runtime environment
%
% Copyright (c) 2016 Johannes Willkomm
% Copyright (c) 2011-2014 Johannes Willkomm
%
function obj = complex(a, b)
obj = arrdercont(a);
if isscalar(a)
obj.m_size = size(b);
a.m_derivs = repmat(a.m_derivs, [1 b.m_size]);
elseif isscalar(b)
b.m_der... |
github | microsoft/ADBench-master | size.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/size.m | 475 | utf_8 | 9af80e00909793314e8275dfec596966 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function [varargout] = size(obj, varargin)
if nargin > 1
varargout{1} = obj.m_size(varargin{1});
else
if nargout <= 1
varargout{1} = obj.m_size;
else
for i=1:nargout-1
varargout{i}... |
github | microsoft/ADBench-master | flipdim.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/flipdim.m | 334 | utf_8 | bfd657481c9944468a65e20c682c9286 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = flipdim(obj, k)
obj.m_derivs = flipdim(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), k);
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_size) obj.m_ndd]);
end
% $Id: flipdim.m 4336 2014-05-23 16:41:5... |
github | microsoft/ADBench-master | log.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/log.m | 211 | utf_8 | 30ee2aaaf785dbafff66740c5e1aaf96 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = log(obj)
obj = unopFlat(obj, @log);
end
% $Id: log.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | plusdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/plusdd.m | 225 | utf_8 | 84dc692067b79e587aabd2d75d26c1d8 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = plusdd(obj, right)
obj = binopFlatdd(obj, right, @plus);
end
% $Id: plusdd.m 4392 2014-06-03 07:41:31Z willkomm $
|
github | microsoft/ADBench-master | conj.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/conj.m | 214 | utf_8 | 6b7bb48888b6c48f19779c96f8c3d7e0 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = conj(obj)
obj = unopFlat(obj, @conj);
end
% $Id: conj.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | subsref.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/subsref.m | 2,509 | utf_8 | 50c6a7f4a884a2da6b00756221808326 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function varargout = subsref(obj, ind)
% fprintf('arrdercont.subsref: %s, nargout=%d\n', num2str(size(obj)),nargout);
% disp(ind);
switch ind(1).type
case '()'
subs = ind(1).subs;
objsz = obj.m_size;
is... |
github | microsoft/ADBench-master | admGetDD.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/admGetDD.m | 238 | utf_8 | 973fb17f05e70102bd731bdfac4f5953 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function val = admGetDD(obj, i)
val = reshape(obj.m_derivs(:,i), obj.m_size);
end
% $Id: admGetDD.m 4173 2014-05-13 15:04:48Z willkomm $
|
github | microsoft/ADBench-master | plus.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/plus.m | 229 | utf_8 | f0c723637f54a4399eaa6a0a90732e4b | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = plus(obj, right)
obj = binopFlat(obj, right, @plus);
end
% $Id: plus.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | binopFlatdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/binopFlatdd.m | 527 | utf_8 | f66037ccd13eb569c3483d1342e6dbe3 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = binopFlatdd(obj, right, handle)
isc_obj = prod(obj.m_size) == 1;
dd1 = reshape(obj.m_derivs, [obj.m_size obj.m_ndd]);
dd2 = reshape(right.m_derivs, [right.m_size right.m_ndd]);
if isc_obj
obj.m_... |
github | microsoft/ADBench-master | admSetDD.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/admSetDD.m | 225 | utf_8 | 98059fb7767196569934db42a664ff64 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = admSetDD(obj, i, val)
obj.m_derivs(:,i) = val(:);
end
% $Id: admSetDD.m 4173 2014-05-13 15:04:48Z willkomm $
|
github | microsoft/ADBench-master | max.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/max.m | 292 | utf_8 | ce18a4d4b083a2fcf10ef5b8e211f3a8 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function [obj, mi] = max(obj)
[mv, mi] = max(obj.m_derivs{1});
for i=1:obj.m_ndd
obj.m_derivs{i} = obj.m_derivs{i}(mi);
end
end
% $Id: max.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | plusddes.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/plusddes.m | 237 | utf_8 | 2a8d40dd4f58272db22fee409849cfc2 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = plusddes(obj, right)
obj.m_derivs = obj.m_derivs + right.m_derivs;
end
% $Id: plusddes.m 4585 2014-06-22 08:06:21Z willkomm $
|
github | microsoft/ADBench-master | lt.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/lt.m | 211 | utf_8 | d2263b049b7b23c1781cb5d82bd50c97 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = lt(obj, v)
res = cmpop(obj, v, @lt);
end
% $Id: lt.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | binopFlatdv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/binopFlatdv.m | 691 | utf_8 | 82624c10748453525d732df5db60fa59 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = binopFlatdv(obj, right, handle)
% fprintf(1, 'binopFlatdv: @%s, (%s), (%s)\n', func2str(handle), num2str(size(obj)), num2str(size(right)));
isc_obj = prod(obj.m_size) == 1;
dd1 = reshape(obj.m_derivs, ... |
github | microsoft/ADBench-master | mtimes.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/mtimes.m | 1,587 | utf_8 | b18a72fa98ae3923d9c4a4b5784ab2cd | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function res = mtimes(obj, right)
if isscalar(obj) || isscalar(right)
res = times(obj, right);
else
if isobject(obj)
if isobject(right)
% fprintf(admLogFile, 'mtimes: (%dm x %dn x %dndd) * (%dm x ... |
github | microsoft/ADBench-master | zerobj.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/zerobj.m | 236 | utf_8 | c442cc762da5b8a8ca7331c3e2ea26d5 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = zerobj(obj)
obj.m_derivs = zeros([prod(obj.m_size) obj.m_ndd]);
end
% $Id: zerobj.m 4592 2014-06-22 08:17:05Z willkomm $
|
github | microsoft/ADBench-master | mldivide.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/mldivide.m | 853 | utf_8 | 402b54cdd7b2aebe546c618fcfc2d2a3 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function res = mldivide(obj, right)
if isobject(obj)
warning('why here?')
res = binopLoop(obj, right, @mldivide);
else
if isscalar(obj)
res = ldivide(obj, right);
else
% fprintf(admLogFi... |
github | microsoft/ADBench-master | set.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/set.m | 880 | utf_8 | 243de0f5c9cc246c835b4b81ef9f988d | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = set(obj, name, varargin)
if isa(name, 'char')
val = varargin{1};
switch name
case 'direct'
obj.m_derivs = reshape(val, [], obj.m_ndd);
case 'deriv'
obj.m_derivs = val;
... |
github | microsoft/ADBench-master | binopFlatddes.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/binopFlatddes.m | 267 | utf_8 | 3f1d00ce29ededfd4060e78a7ea3e98b | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = binopFlatddes(obj, right, handle)
obj.m_derivs = handle(obj.m_derivs, right.m_derivs);
end
% $Id: binopFlatddes.m 4497 2014-06-13 12:00:25Z willkomm $
|
github | microsoft/ADBench-master | rdividedv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/rdividedv.m | 242 | utf_8 | 7102db47e06f61cf0c06790385044c78 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = rdividedv(obj, right)
obj = binopFlatdv(obj, 1 ./ right, @times);
end
% $Id: rdividedv.m 4414 2014-06-04 06:22:28Z willkomm $
|
github | microsoft/ADBench-master | rdivide.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/rdivide.m | 238 | utf_8 | 8814baef9a3eac6c6e48c5df00210424 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = rdivide(obj, right)
obj = binopFlat(obj, right, @rdivide);
end
% $Id: rdivide.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | disp.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/disp.m | 374 | utf_8 | f3e2c85dce151a586e3f54b18145ad75 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function disp(obj)
fprintf('N-Times wrapper with %d directions of size %s\n', obj.m_ndd, ...
mat2str(size(obj)));
for i=1:obj.m_ndd
fprintf('Direction %d:\n', i);
disp(admGetDD(obj, i));
end
e... |
github | microsoft/ADBench-master | unopLoop.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/unopLoop.m | 433 | utf_8 | 6fe750c3bb82bdab2e34e811d5e22c18 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = unopLoop(obj, handle, varargin)
res = cell(obj.m_ndd, 1);
sz = obj.m_size;
for i=1:obj.m_ndd
dd1 = reshape(obj.m_derivs(:,i), sz);
dd = handle(dd1, varargin{:});
res{i} = dd(:);
end
ob... |
github | microsoft/ADBench-master | cos.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/cos.m | 211 | utf_8 | d3dee0420096e813f9a0f1be96e5ad4d | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = cos(obj)
obj = unopFlat(obj, @cos);
end
% $Id: cos.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | sin.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/sin.m | 211 | utf_8 | 830e83e5fce94d805efa9a48e5a7f9f8 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = sin(obj)
obj = unopFlat(obj, @sin);
end
% $Id: sin.m 3862 2013-09-19 10:50:56Z willkomm $
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.