You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Function class. a Function can be written as f(x) where the "x" is the input variable. In our implementations, "x" will be represented as an object of the Simplex type (a tuple + the cell type). The member function get_value(x) will return the value of f(x).
Refactor DifferentaibleFunction class. This is a child class of Function class. It will have the functions for differentiations: get_grad(x), get_hess(x).
PSF can be written as psf(pi), where pi is the domain the function is defined on. PSF is no longer a child class of Function since the domain is different
PSDF inherits from only PSF. The per simplex differentials take two arguments: the domain and the variable.We defineget_grad(pi, x) for example, where pi is the domain, x is the variable
LocalFunction has a pointer to PSF as a member variable. The member function is get_value(x), where the variable x is an object of the Simplex class that holds the information of the primitive type of the variable
LDF is a child class of LocalF and DiffF
add get_variable function. This polymorphic function has two APIs: i) have a single domain_simplex as the argument and return three coordinates of double type. ii) have domain_simplex and variable_simplex as arguments and return three coordinate of DScalar autodiff type, where the variable that the function is differentiated wrt has the gradient bit in the DScalar type flipped to 1. This function stays in AutoDiffFunction class for now
The text was updated successfully, but these errors were encountered:
In AutodiffFunction: change get_value_autodiff to get_function_autodiff, since this member function de facto encodes the Function defined over a specific domain wrt the variable using the autodiff convention. The function signature is
get_function_autodiff(const Simplex& domain_simplex, const Simplex& variable_simplex)
Refactor
Function
class. a Function can be written as f(x) where the "x" is the input variable. In our implementations, "x" will be represented as an object of the Simplex type (a tuple + the cell type). The member functionget_value(x)
will return the value of f(x).Refactor
DifferentaibleFunction
class. This is a child class ofFunction
class. It will have the functions for differentiations:get_grad(x)
,get_hess(x).
PSF
can be written as psf(pi), where pi is the domain the function is defined on.PSF
is no longer a child class ofFunction
since the domain is differentPSDF
inherits from onlyPSF
. The per simplex differentials take two arguments: the domain and the variable.We defineget_grad(pi, x)
for example, where pi is the domain, x is the variableLocalFunction
has a pointer to PSF as a member variable. The member function is get_value(x), where the variable x is an object of the Simplex class that holds the information of the primitive type of the variableLDF
is a child class ofLocalF
andDiffF
add
get_variable
function. This polymorphic function has two APIs: i) have a single domain_simplex as the argument and return three coordinates of double type. ii) have domain_simplex and variable_simplex as arguments and return three coordinate of DScalar autodiff type, where the variable that the function is differentiated wrt has the gradient bit in the DScalar type flipped to 1. This function stays inAutoDiffFunction
class for nowThe text was updated successfully, but these errors were encountered: