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_sumstruct.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_sumstruct.m | 1,141 | utf_8 | 3d9f16ed41372a83c900ba6d9703fca6 | % function res = adimat_sumstruct(a, b)
% This computes the sum of structs a and b.
%
% see also admDiffRev, adimat_adjsum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2009-2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University.
% Copyright 2003-2008 And... |
github | microsoft/ADBench-master | g_besselk.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_besselk.m | 612 | utf_8 | 0c1130b6fcc77c270dc4c9b0ea8a0eed | % function [z, g_z] = a_besselk(nu, g_x, x, opt?)
%
% compute the derivative of z in z = besselk(nu, x, opt?), where g_x
% is the derivative of x.
%
% see also dpartial_besselk
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
% ... |
github | microsoft/ADBench-master | g_besselh.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_besselh.m | 621 | utf_8 | 5a4953e9ba2e6e14ed3afd52e4408ab2 | % function [z, g_z] = g_besselh(nu, g_x, x, opt?)
%
% compute the derivative of z in z = besselh(nu, x, opt?), where g_x
% is the derivative of x.
%
% see also dpartial_besselj
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
% ... |
github | microsoft/ADBench-master | adimat_pop_index2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_pop_index2.m | 736 | utf_8 | 03ce50c7db417e45550ca556f275f522 | % function r = adimat_pop_index2(arrayVar, index1, index2)
% Store values given by arrayVar(index1, ...) on the stack, if this
% indexing is possible. Otherwise the whole variables has to be
% saved, in order to restore it to previous size later.
%
% see also adimat_pop, adimat_pop_cell_index, adimat_push_index
%... |
github | microsoft/ADBench-master | g_eigs.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_eigs.m | 450 | utf_8 | a988c016e9eda089d7d004caac472e63 | % function [g_l, l]= g_eigs(g_A, A)
%
% This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function [g_l, l]= g_eigs(g_A, A, varargin)
[V D U] = adimat_lreigs(A, varargin{:});
l = diag(D);
k = size(U, 2);
g_l = g_zeros(size(l));
for i=1:k
lambda = l(i);
uk =... |
github | microsoft/ADBench-master | adimat_flush_stack.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_flush_stack.m | 385 | utf_8 | 4daba2f2f4bbea9d60452536f518fa16 | %
% function r = adimat_flush_stack()
% flush stack - if the stack implmentation uses a file, write all
% stack contents to that file
%
% see also adimat_stack, adimat_stack_size, adimat_clear_stack
%
% This file is part of the ADiMat runtime environment
%
function r = adimat_flush_stack()
r = adimat_store(5, 0);
... |
github | microsoft/ADBench-master | d_adimat_norm2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_adimat_norm2.m | 19,726 | utf_8 | 9df4915d0595c9ddf2753ddbd0c9e391 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | a_adimat_prod1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_prod1.m | 5,577 | utf_8 | ee310fd3782704d54a72559d93f36ccf | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | g_adimat_prod1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_adimat_prod1.m | 2,145 | utf_8 | fa60fd1070278d7d53f2fa99e1ebd159 | % Generated by ADiMat 0.6.0-4867
% Copyright 2009-2013 Johannes Willkomm, Fachgebiet Scientific Computing,
% TU Darmstadt, 64289 Darmstadt, Germany
% Copyright 2001-2008 Andre Vehreschild, Institute for Scientific Computing,
% RWTH Aachen University, 52056 Aachen, Germany.
% Visit us on the web at http://www.adimat.de
... |
github | microsoft/ADBench-master | adimat_d_cumtrapz.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_d_cumtrapz.m | 943 | utf_8 | 761f8d9a1fdc46fbf1886f07ee12e709 | % function [d_z z] = adimat_d_cumtrapz(d_a, a, d_b, b, c)
%
% Copyright (C) 2015 Johannes Willkomm
function [d_z z] = adimat_d_cumtrapz(d_a, a, d_b, b, c)
if nargin == 2
% cumtrapz(Y)
z = cumtrapz(a);
J_Y = partial_cumtrapz_Y(a);
d_z = admMatMultV1MTb(J_Y, d_a(:,:));
elseif nargin == 4
z = cumtr... |
github | microsoft/ADBench-master | createSeededGradientsRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/mat_derivclass/createSeededGradientsRev.m | 1,249 | utf_8 | f372371f6b7cf93dc483fcd760ee4500 | % 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/mat_derivclass/createSeededGradientsFor.m | 1,693 | utf_8 | b24e127a02ee22613be4f72f80ec2dfa | % 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/mat_derivclass/admJacFor.m | 851 | utf_8 | 3fb0122a016ff536128dd5cec753d75c | % function Jac = admJacFor(varargin)
%
% 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
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | admComputeDerivFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/mat_derivclass/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/mat_derivclass/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/mat_derivclass/admJacRev.m | 824 | utf_8 | 8d662d7fc8d109e2a3668d40f5ff5f19 | % function Jac = admJacRev(varargin)
%
% 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
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | option.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/mat_derivclass/@madderiv/private/option.m | 1,919 | utf_8 | b7a5bdb956bdc3793af18066ff3bcc84 | function res= option(cmd, val)
% ADDERIV/PRIVATE/OPTION -- Set and get options.
%
% Copyright 2003, 2004 Andre Vehreschild, Inst. f. Scientific Computing
% This code is under development! Use at your own risk! Duplication,
% modification and distribution FORBIDDEN!
persistent options
if isempty(options)
options= c... |
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/a_zeros1.m | 607 | utf_8 | 0733f0e0e5f3100de26e260aefc70d88 | % function varargout = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint
%
% T... |
github | microsoft/ADBench-master | tay_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/tay_zeros.m | 311 | utf_8 | 91c6774a75ffbd6e7210531517d78d50 | % function tobj = tay_zeros(c)
%
% see also a_zeros, adimat_adjoint, tseries3
%
% This file is part of the ADiMat runtime environment
%
function tobj = tay_zeros(c)
if isobject(c)
tobj = zerobj(c);
else
tobj = tseries2(zeros(size(c)));
end
% $Id: tay_zeros.m 4589 2014-06-22 08:14:54Z willkomm $
|
github | microsoft/ADBench-master | a_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/a_zeros.m | 761 | utf_8 | 2fee964295a620f719fbf2d763f0a03e | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint... |
github | microsoft/ADBench-master | admTaylorArrayInt.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/admTaylorArrayInt.m | 885 | utf_8 | 52952c93f3ce9d81c9c0a2070c73160b | % function T = admTaylorArrayInt(varargin)
% concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tseries derivative class.
%
% Copyright (C) 2015 Johannes Willkomm
% Copyright (C) 2010-2012 Johannes Willkomm, Institute for Scien... |
github | microsoft/ADBench-master | admTaylorArray.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/admTaylorArray.m | 611 | utf_8 | 7fd88ea8ce72431e86f0b72195291d7c | % function T = admTaylorArray(varargin)
% concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tseries derivative class.
%
% Copyright (C) 2015 Johannes Willkomm
% Copyright (C) 2010-2012 Johannes Willkomm, Institute for Scientif... |
github | microsoft/ADBench-master | ode113.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode113.m | 214 | utf_8 | 03900610beef3f2d30b77b6e01199989 | % function [t, y_obj] = ode113(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode113(func, ts, y0)
[t, y_obj] = ode_generic(@ode113, func, ts, y0);
|
github | microsoft/ADBench-master | ode15s.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode15s.m | 214 | utf_8 | 944d071ba65ed7217692b8ffca83953e | % function [t, y_obj] = ode15s(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode15s(func, ts, y0)
[t, y_obj] = ode_generic(@ode15s, func, ts, y0);
|
github | microsoft/ADBench-master | ode23s.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode23s.m | 214 | utf_8 | 8ad7bf2b0e140218bf0a6a526e065feb | % function [t, y_obj] = ode23s(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23s(func, ts, y0)
[t, y_obj] = ode_generic(@ode23s, func, ts, y0);
|
github | microsoft/ADBench-master | ode23.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode23.m | 211 | utf_8 | 34f20cdd49e6ca8de4c0f8eff97e1b52 | % function [t, y_obj] = ode23(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23(func, ts, y0)
[t, y_obj] = ode_generic(@ode23, func, ts, y0);
|
github | microsoft/ADBench-master | ode23t.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode23t.m | 214 | utf_8 | c9dae41ad2d9b7119481d5c74d684ab7 | % function [t, y_obj] = ode23t(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23t(func, ts, y0)
[t, y_obj] = ode_generic(@ode23t, func, ts, y0);
|
github | microsoft/ADBench-master | ode23tb.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode23tb.m | 217 | utf_8 | 558ce2b8d3dc568513a7a7b031e22719 | % function [t, y_obj] = ode23tb(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23tb(func, ts, y0)
[t, y_obj] = ode_generic(@ode23tb, func, ts, y0);
|
github | microsoft/ADBench-master | ode15i.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode15i.m | 214 | utf_8 | f8396fb6e911ef2a2c1f1a1469d9c635 | % function [t, y_obj] = ode15i(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode15i(func, ts, y0)
[t, y_obj] = ode_generic(@ode15i, func, ts, y0);
|
github | microsoft/ADBench-master | ode_generic.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode_generic.m | 3,825 | utf_8 | 08bfc6c48ec1538bcb221065fc36e918 | % function [t, y_obj] = ode_generic(integrator, func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode_generic(integrator, func, ts, y0)
if y0.m_ord > 2
error('adimat:tseries2:det:unsupportedOrder', ...
['Taylor coefficients of the functions od... |
github | microsoft/ADBench-master | ode45.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor3/@tseries2/ode45.m | 211 | utf_8 | 9e3ab6279b6f1b7e4914056dd6ce5840 | % function [t, y_obj] = ode45(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode45(func, ts, y0)
[t, y_obj] = ode_generic(@ode45, func, ts, y0);
|
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/scalar/a_zeros1.m | 644 | utf_8 | 52d8c194a3bd74accd554787398394bf | % function adj = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivatives of
% class double, by calling the function zeros. These adjoints are used
% in scalar reverse mode.
%
% see also zeros, adimat_adjoint
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2011 Johannes Willkom... |
github | microsoft/ADBench-master | a_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/scalar/a_zeros.m | 799 | utf_8 | d85c57f96dc08d90b550d16a2f2dddc8 | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivatives of
% class double, by calling the function zeros. These adjoints are used
% in scalar reverse mode.
%
% see also zeros, adimat_adjoint
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2011 Joha... |
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/a_zeros1.m | 607 | utf_8 | 2c354dde0187e741c9bbb0c9f10007b3 | % function varargout = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint
%
% T... |
github | microsoft/ADBench-master | tay_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/tay_zeros.m | 254 | utf_8 | c32982f0d00971d4828c206fff63a0a6 | % function tobj = tay_zeros2(c)
%
% see also a_zeros, adimat_adjoint, tseries2
%
% This file is part of the ADiMat runtime environment
%
function tobj = tay_zeros(c)
tobj = tseries2(c, 'zeros');
% $Id: tay_zeros.m 4391 2014-05-30 14:39:26Z willkomm $
|
github | microsoft/ADBench-master | a_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/a_zeros.m | 761 | utf_8 | 0ed3b61060904800d0bec0f31f384186 | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint... |
github | microsoft/ADBench-master | admTaylorArrayInt.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/admTaylorArrayInt.m | 885 | utf_8 | 52952c93f3ce9d81c9c0a2070c73160b | % function T = admTaylorArrayInt(varargin)
% concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tseries derivative class.
%
% Copyright (C) 2015 Johannes Willkomm
% Copyright (C) 2010-2012 Johannes Willkomm, Institute for Scien... |
github | microsoft/ADBench-master | admTaylorArray.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/admTaylorArray.m | 611 | utf_8 | 7fd88ea8ce72431e86f0b72195291d7c | % function T = admTaylorArray(varargin)
% concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tseries derivative class.
%
% Copyright (C) 2015 Johannes Willkomm
% Copyright (C) 2010-2012 Johannes Willkomm, Institute for Scientif... |
github | microsoft/ADBench-master | ode113.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode113.m | 214 | utf_8 | 03900610beef3f2d30b77b6e01199989 | % function [t, y_obj] = ode113(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode113(func, ts, y0)
[t, y_obj] = ode_generic(@ode113, func, ts, y0);
|
github | microsoft/ADBench-master | ode15s.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode15s.m | 214 | utf_8 | 944d071ba65ed7217692b8ffca83953e | % function [t, y_obj] = ode15s(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode15s(func, ts, y0)
[t, y_obj] = ode_generic(@ode15s, func, ts, y0);
|
github | microsoft/ADBench-master | ode23s.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode23s.m | 214 | utf_8 | 8ad7bf2b0e140218bf0a6a526e065feb | % function [t, y_obj] = ode23s(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23s(func, ts, y0)
[t, y_obj] = ode_generic(@ode23s, func, ts, y0);
|
github | microsoft/ADBench-master | ode23.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode23.m | 211 | utf_8 | 34f20cdd49e6ca8de4c0f8eff97e1b52 | % function [t, y_obj] = ode23(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23(func, ts, y0)
[t, y_obj] = ode_generic(@ode23, func, ts, y0);
|
github | microsoft/ADBench-master | ode23t.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode23t.m | 214 | utf_8 | c9dae41ad2d9b7119481d5c74d684ab7 | % function [t, y_obj] = ode23t(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23t(func, ts, y0)
[t, y_obj] = ode_generic(@ode23t, func, ts, y0);
|
github | microsoft/ADBench-master | ode23tb.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode23tb.m | 217 | utf_8 | 558ce2b8d3dc568513a7a7b031e22719 | % function [t, y_obj] = ode23tb(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode23tb(func, ts, y0)
[t, y_obj] = ode_generic(@ode23tb, func, ts, y0);
|
github | microsoft/ADBench-master | ode15i.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode15i.m | 214 | utf_8 | f8396fb6e911ef2a2c1f1a1469d9c635 | % function [t, y_obj] = ode15i(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode15i(func, ts, y0)
[t, y_obj] = ode_generic(@ode15i, func, ts, y0);
|
github | microsoft/ADBench-master | ode_generic.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode_generic.m | 3,825 | utf_8 | 08bfc6c48ec1538bcb221065fc36e918 | % function [t, y_obj] = ode_generic(integrator, func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode_generic(integrator, func, ts, y0)
if y0.m_ord > 2
error('adimat:tseries2:det:unsupportedOrder', ...
['Taylor coefficients of the functions od... |
github | microsoft/ADBench-master | ode45.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor2/@tseries2/ode45.m | 211 | utf_8 | 9e3ab6279b6f1b7e4914056dd6ce5840 | % function [t, y_obj] = ode45(func, ts, y0)
%
% Copyright (c) 2018 Johannes Willkomm <johannes@johannes-willkomm.de>
%
function [t, y_obj] = ode45(func, ts, y0)
[t, y_obj] = ode_generic(@ode45, func, ts, y0);
|
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/default/a_zeros1.m | 611 | utf_8 | 526c5c1ce338a15272b977bccd106ae5 | % function varargout = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint
%
% T... |
github | microsoft/ADBench-master | a_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/default/a_zeros.m | 765 | utf_8 | a89b1a476a2ea3accb1b96b05c665547 | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint... |
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor/a_zeros1.m | 607 | utf_8 | 2c354dde0187e741c9bbb0c9f10007b3 | % function varargout = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint
%
% T... |
github | microsoft/ADBench-master | tay_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor/tay_zeros.m | 251 | utf_8 | d5ae55fc225432fafa9072eaca17799c | % function tobj = tay_zeros(c)
%
% see also a_zeros, adimat_adjoint, tseries
%
% This file is part of the ADiMat runtime environment
%
function tobj = tay_zeros(c)
tobj = tseries(c, 'zeros');
% $Id: tay_zeros.m 4391 2014-05-30 14:39:26Z willkomm $
|
github | microsoft/ADBench-master | a_zeros.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor/a_zeros.m | 761 | utf_8 | 0ed3b61060904800d0bec0f31f384186 | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint... |
github | microsoft/ADBench-master | admTaylorArray.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor/admTaylorArray.m | 1,020 | utf_8 | ebfb06485eeeb97aa4a165b494b73550 | % function T = admTaylorArray(varargin)
% concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tseries derivative class.
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Ve... |
github | microsoft/ADBench-master | tseries.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/adjointclasses/taylor/tseries.m | 34,273 | utf_8 | bf72959fa261ee53bd5f1632488f2c40 | classdef tseries
properties
m_series
m_ord
end
methods(Static)
function r = option(name, val)
persistent options
if nargin < 2
switch name
case 'options'
r = options;
case 'maxorder'
r = options.ord;
case 'inner'
r = options.inner;
case {'DerivativeClassVersion'}
... |
github | microsoft/ADBench-master | foderiv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/foderiv.m | 11,490 | utf_8 | 25b5f0ff1022d7e92763253bdebbb4ad | classdef foderiv
properties
m_derivs
m_ndd
end
methods(Static)
function r = option(name, val)
persistent global_ndd global_inner
if nargin < 2
r = sprintf('unknown field %s', name);
switch name
case {'ndd', 'NumberOfDirectionalDerivatives'}
r = global_ndd;
case {'inner'}
if isemp... |
github | microsoft/ADBench-master | createSeededGradientsRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/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 | admTaylor2For.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/admTaylor2For.m | 864 | utf_8 | 1b3c13cbf390db93a88c2ac56569b4c8 | % function T2 = admTaylor2For(varargin)
%
% This file is part of the ADiMat runtime environment, and belongs
% to the opt_derivclass derivative class.
%
% Copyright 2009-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | createSeededGradientsFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/createSeededGradientsFor.m | 1,693 | utf_8 | d68551ef78d54f76d5870e83eb8d33f1 | % 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/foderivclass_cell/admJacFor.m | 851 | utf_8 | d4011c6947605d5b84e4013b6106436a | % function Jac = admJacFor(varargin)
%
% 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
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | getdd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/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/foderivclass_cell/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/foderivclass_cell/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/foderivclass_cell/admJacRev.m | 824 | utf_8 | 3ad5dfb0015e2ac1dd23865325f42f64 | % function Jac = admJacRev(varargin)
%
% 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
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | admComputeDerivFor2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/foderivclass_cell/admComputeDerivFor2.m | 1,872 | utf_8 | bd61363a24880665a296a31c7be64199 | % function [Hessian, Jacobian, varargout] = ...
% admComputeDerivFor2(diffFunction, seedV, seedW, ...
% independents, dependents, fNargout, varargin)
%
% Compute derivatives in second order FM with RE opt_derivclass or
% opt_sp_derivclass.
%
% see also admDiffFor2, admOptions, adimat_derivc... |
github | microsoft/ADBench-master | createSeededGradientsRev.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/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/arrderivclass/createSeededGradientsFor.m | 1,364 | utf_8 | 0e9040942a424a6ce8da19e74b0e629d | % 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 2014 Johannes Willkomm
% Copyright 2009,2010 Johannes Willkomm, In... |
github | microsoft/ADBench-master | admJacFor.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/admJacFor.m | 1,013 | utf_8 | 0a055b87248745552142342145a8b2ca | % 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/arrderivclass/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/arrderivclass/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/arrderivclass/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/arrderivclass/admJacRev.m | 1,003 | utf_8 | 28fe25a3bc71716ec022c8e8bb6b5d72 | % 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/arrderivclass/@arrdercont/fliplr.m | 208 | utf_8 | f19b819c507ec9251f02ad56d4c6d74c | % 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 4323 2014-05-23 09:17:16Z willkomm $
|
github | microsoft/ADBench-master | uplus.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@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/arrderivclass/@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/arrderivclass/@arrdercont/get.m | 563 | utf_8 | b603971103edc25068f4577c014232ad | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function val = get(obj, name)
% if iscell(name)
% val = admGetDDs(obj, name{1});
% return
% end
switch name
case 'direct'
dirs = cell(obj.m_ndd, 1);
for i=1:obj.m_ndd
dirs{i} = admGetDD(obj,... |
github | microsoft/ADBench-master | triu.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/triu.m | 306 | utf_8 | ba64d5fd2ebf01f1eaa8ec6e4e87c246 | % This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function obj = triu(obj, k)
if nargin<2
k = 0;
end
for i=1:min(obj.m_size(1)+k, obj.m_size(2))
obj.m_derivs(:,max(1,i+1-k):end,i) = 0;
end
end
% $Id: triu.m 4959 2015-03-03 08:35:00Z willkomm $
|
github | microsoft/ADBench-master | ifft.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/ifft.m | 953 | utf_8 | c68da9d5cbdd5008e8112ab75d6c0bf6 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = ifft(obj, varargin)
mode = 'nonsymmetric';
if nargin > 1 && ischar(varargin{end})
mode = varargin{end};
varargin = varargin(1:end-1);
end
if length(varargin) < 1
n = [];
else
n = v... |
github | microsoft/ADBench-master | eq.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@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/arrderivclass/@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/arrderivclass/@arrdercont/cumsum.m | 320 | utf_8 | 83831c89b8a6b54f114530b8adeaadd3 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = cumsum(obj, k)
if nargin < 2
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = cumsum(obj.m_derivs, k+1);
obj.m_size = computeSize(obj);
end
% $Id: cumsum.m 4323 2014-05-23 09:17:16Z willkomm $
|
github | microsoft/ADBench-master | tan.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@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/arrderivclass/@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/arrderivclass/@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/arrderivclass/@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/arrderivclass/@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/arrderivclass/@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/arrderivclass/@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/arrderivclass/@arrdercont/reshape.m | 481 | utf_8 | 8ce7b8a5b42d5c5a62b2bd98a486b9e1 | % This file is part of the ADiMat runtime environment
%
% Copyright (C) 2011,2012,2013,2015 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 =... |
github | microsoft/ADBench-master | subsasgn_old.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/subsasgn_old.m | 2,532 | utf_8 | 7a22c1c775cff0a04e577e64ef70d211 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = subsasgn_old(obj, ind, rhs)
switch ind(1).type
case '()'
subs = ind(1).subs;
dind = ind;
if ~(length(subs) == 1 && ischar(subs{1}) && ischar(subs{1}) && isequal(subs{1}, ':'))
di... |
github | microsoft/ADBench-master | transpose.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/transpose.m | 278 | utf_8 | e3d1f1530c0f17787e1c6911b7b0bd01 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = transpose(obj)
obj.m_derivs = permute(obj.m_derivs, [1 3 2]);
obj.m_size = fliplr(obj.m_size);
end
% $Id: transpose.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | tril.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/tril.m | 305 | utf_8 | f90012eca89f6a0ce8807841f0efd8e9 | % This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function obj = tril(obj, k)
if nargin<2
k = 0;
end
for i=1:min(obj.m_size(1),obj.m_size(1)-k)
obj.m_derivs(:,i,max(1,i+1+k):end) = 0;
end
end
% $Id: tril.m 4959 2015-03-03 08:35:00Z willkomm $
|
github | microsoft/ADBench-master | mrdivide.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/mrdivide.m | 549 | utf_8 | 06518bbdb51161ab2afdbb845de9f388 | % 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/arrderivclass/@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 | cross.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/cross.m | 500 | utf_8 | 1e5623d34a52c5f3835bb00340eb0405 | % @arrdercont/cross
% function obj = cross(a, b, dim)
%
% Compute cross product.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright (c) 2016 Johannes Willkomm
function obj = cross(a, b, dim)
if nargin < 3
dim = find(size(a) == 3);
end
if isobject(a)
a.m_derivs = cross(a.m_derivs, repma... |
github | microsoft/ADBench-master | end.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@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/arrderivclass/@arrdercont/binopLoop.m | 1,814 | utf_8 | 51c88f86bfd7945c3f96310d8a8dc248 | % 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(1,... |
github | microsoft/ADBench-master | imag.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@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/arrderivclass/@arrdercont/subsasgn.m | 4,342 | utf_8 | 6450979793dc3354475066230f28da82 | % 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')
t(subs{:}) = zeros(size(rhs));
obj = arrdercont(t);
end
sz = obj.m_size;... |
github | microsoft/ADBench-master | atan.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/atan.m | 208 | utf_8 | 72fde737bda3f9640fc89ba441e3097c | % This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
%
function obj = atan(obj)
obj = unopFlat(obj, @atan);
end
% $Id: atan.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | unopLoopWO.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclass/@arrdercont/unopLoopWO.m | 500 | utf_8 | 34711c26903e9644588e8cd76a941387 | % 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);
for i=1:obj.m_ndd
dd1 = reshape(obj.m_derivs(i,:), [obj.m_size]);
dd = handle(varargin{1:wo-1}, dd1, varargin{wo+... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.