/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math3/analysis/differentiation/ |
H A D | SparseGradient.java | 54 private final Map<Integer, Double> derivatives; field in SparseGradient 58 * @param derivatives derivatives map, a deep copy will be performed, 60 * may be null to create an empty derivatives map, i.e. a constant value 62 private SparseGradient(final double value, final Map<Integer, Double> derivatives) { in SparseGradient() argument 64 this.derivatives = new HashMap<Integer, Double>(); in SparseGradient() 65 if (derivatives != null) { in SparseGradient() 66 this.derivatives.putAll(derivatives); in SparseGradient() 72 * @param scale scaling factor to apply to all derivatives 73 * @param derivatives derivatives map, a deep copy will be performed, 75 * may be null to create an empty derivatives map, i.e. a constant value [all …]
|
H A D | DerivativeStructure.java | 39 * value of a function. Dan Kalman's derivative structures hold all partial derivatives 49 * on the derivation order despite no requiring users to compute the derivatives by 72 /** Build an instance with all values and derivatives set to 0. 80 /** Build an instance with all values and derivatives set to 0. 193 /** Build an instance from all its derivatives. 196 * @param derivatives derivatives sorted according to 198 * @exception DimensionMismatchException if derivatives array does not match the 203 public DerivativeStructure(final int parameters, final int order, final double ... derivatives) in DerivativeStructure() argument 206 if (derivatives.length != data.length) { in DerivativeStructure() 207 throw new DimensionMismatchException(derivatives.length, data.length); in DerivativeStructure() [all …]
|
H A D | DSCompiler.java | 42 * value and partial derivatives. The class does not hold these arrays, which remains under 46 * thousands of different parameters kept together with all theur partial derivatives. 49 * The arrays on which compilers operate contain only the partial derivatives together 50 * with the 0<sup>th</sup> derivative, i.e. the value. The partial derivatives are stored in 87 * // we don't know where first derivatives are stored, so we ask the compiler 92 * // we let all higher order derivatives set to 0 109 * // first derivatives 114 * // cross derivatives (assuming order was at least 2) 137 /** Number of partial derivatives (including the single 0 order derivative element). */ 140 /** Indirection array for partial derivatives. */ [all …]
|
H A D | FiniteDifferencesDifferentiator.java | 36 * wrapper objects compute derivatives in addition to function 43 * theoretically able to compute derivatives up to order n-1, but 56 * compute accurate derivatives for any order. However, due to numerical 118 * these cases. At an extreme case, computing derivatives exactly at the lower bound 182 * Evaluate derivatives from a sample. 186 * @param t evaluation abscissa value and derivatives 189 * @return value and derivatives at {@code t} 217 final double[] derivatives = t.getAllDerivatives(); in evaluate() local 227 derivatives[0] = dt0 - (i - 1) * stepSize; in evaluate() 228 … final DerivativeStructure deltaX = new DerivativeStructure(parameters, order, derivatives); in evaluate() [all …]
|
/aosp_15_r20/external/eigen/unsupported/Eigen/src/AutoDiff/ |
H A D | AutoDiffScalar.h | 43 …* \param DerivativeType the vector type used to store/represent the derivatives. The base scalar t… 44 * as well as the number of derivatives to compute are determined from this type. 45 * Typical choices include, e.g., \c Vector4f for 4 derivatives, or \c VectorXf 46 * if the number of derivatives is not known at compile time, and/or, the number 47 * of derivatives is large. 52 …* This class represents a scalar value while tracking its respective derivatives using Eigen's exp… 62 * while derivatives are computed right away. 87 …and initializes the \a nbDer derivatives such that it corresponds to the \a derNumber -th variable… 95 * The derivatives are set to zero. */ 103 /** Constructs an active scalar from its \a value and derivatives \a der */ [all …]
|
/aosp_15_r20/external/eigen/unsupported/test/ |
H A D | autodiff.cpp | 214 // TODO also check actual derivatives! 227 // TODO also check actual derivatives! 235 ap.x().derivatives() = Vector2f::UnitX(); in test_autodiff_vector() 236 ap.y().derivatives() = Vector2f::UnitY(); in test_autodiff_vector() 268 //set unit vectors for the derivative directions (partial derivatives of the input vector) in test_autodiff_hessian() 269 x(0).derivatives().resize(2); in test_autodiff_hessian() 270 x(0).derivatives().setZero(); in test_autodiff_hessian() 271 x(0).derivatives()(0)= 1; in test_autodiff_hessian() 272 x(1).derivatives().resize(2); in test_autodiff_hessian() 273 x(1).derivatives().setZero(); in test_autodiff_hessian() [all …]
|
H A D | autodiff_scalar.cpp | 32 VERIFY_IS_APPROX(res.derivatives(), x.derivatives()); in check_atan2() 36 VERIFY_IS_APPROX(res.derivatives(), x.derivatives()); in check_atan2() 52 VERIFY_IS_APPROX(res1.derivatives().x(), Scalar(1.0) / (cosh_px * cosh_px)); in check_hyperbolic_functions() 56 VERIFY_IS_APPROX(res2.derivatives().x(), cosh_px); in check_hyperbolic_functions() 60 VERIFY_IS_APPROX(res3.derivatives().x(), std::sinh(p.x())); in check_hyperbolic_functions() 66 VERIFY_IS_APPROX(res1.derivatives().x(), Scalar(0.896629559604914)); in check_hyperbolic_functions() 69 VERIFY_IS_APPROX(res2.derivatives().x(), Scalar(1.056071867829939)); in check_hyperbolic_functions() 72 VERIFY_IS_APPROX(res3.derivatives().x(), Scalar(0.339540557256150)); in check_hyperbolic_functions()
|
/aosp_15_r20/external/pytorch/tools/autograd/ |
H A D | load_derivatives.py | 1 # Parses derivatives.yaml into autograd functions 93 # prefer manually-defined derivatives if any 113 # so we can generate derivatives for them separately. 150 # Ensure that the old derivatives.yaml schema with no dispatch key can be loaded. 171 # that appear in derivatives.yaml. used_dispatch_keys is useful for generating 217 # Check that the referenced derivatives in the formula are in bounds 276 derivatives: list[Derivative], 321 f"Derivative definition of {defn_name} in derivatives.yaml defines the " 326 if not len(derivatives) == 1: 328 f"Derivative definition of {defn_name} in derivatives.yaml defines the " [all …]
|
/aosp_15_r20/external/pytorch/torchgen/api/ |
H A D | autograd.py | 37 # Represents a backward formula that calculates derivatives for one 52 # Names of the arguments for which this formula calculates derivatives. 65 # Represents a forward formula that calculates forward derivatives 75 # derivatives 79 # derivatives 82 # Inputs for which the forward derivatives are required for this formula 92 # If this formula is specified in derivatives.yaml or if we are re-using the 100 # The base name read from derivatives.yaml. 109 # We first use the schema string (under the 'name' key) in derivatives.yaml 113 # derivatives.yaml entry. If there is no exact match, then we choose the [all …]
|
/aosp_15_r20/external/eigen/unsupported/Eigen/src/Splines/ |
H A D | SplineFitting.h | 243 * derivatives. 246 * \param derivatives The desired derivatives of the interpolating spline at interpolation 249 * must be the same size as @a derivatives. 252 * \returns A spline interpolating @a points with @a derivatives at those points. 260 const PointArrayType& derivatives, 265 * \brief Fits an interpolating spline to the given data points and derivatives. 268 … * \param derivatives The desired derivatives of the interpolating spline at interpolation points. 270 * must be the same size as @a derivatives. 274 * \returns A spline interpolating @a points with @a derivatives at those points. 282 const PointArrayType& derivatives, [all …]
|
H A D | Spline.h | 54 /** \brief The data type used to store the values of the basis function derivatives. */ 115 * \brief Evaluation of spline derivatives of up-to given order. 124 * \param order The order up to which the derivatives are computed. 127 derivatives(Scalar u, DenseIndex order) const; 130 * \copydoc Spline::derivatives 136 derivatives(Scalar u, DenseIndex order = DerivativeOrder) const; 158 * \brief Computes the non-zero spline basis function derivatives up to given order. 167 * derivatives are computed. 168 * \param order The order up to which the basis function derivatives are computes. 328 // Retrieve the basis function derivatives up to the desired order... in derivativesImpl() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/ |
H A D | gradients_impl.py | 49 """Constructs symbolic derivatives of sum of `ys` w.r.t. x in `xs`. 55 `gradients()` adds ops to the graph to output the derivatives of `ys` with 63 derivatives using a different initial gradient for each y (e.g., if 70 other things, this allows computation of partial derivatives as opposed to 71 total derivatives. For example: 79 Here the partial derivatives `g` evaluate to `[1.0, 1.0]`, compared to the 80 total derivatives `tf.gradients(a + b, [a, b])`, which take into account the 116 phase. This function is used to evaluate the derivatives of the cost function 181 """Constructs symbolic derivatives of sum of `ys` w.r.t. x in `xs`. 191 `gradients()` adds ops to the graph to output the derivatives of `ys` with [all …]
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math3/analysis/interpolation/ |
H A D | FieldHermiteInterpolator.java | 32 /** Polynomial interpolator using both sample values and sample derivatives. 35 * and provided derivatives. There is one polynomial for each component of 37 * polynomials depends on the number of points and number of derivatives at each 39 * any derivatives all have degree n-1. The interpolation polynomials for n 73 * derivatives. 79 * @param value value and derivatives of the sample point 85 * @exception MathArithmeticException if the number of derivatives is larger 162 /** Interpolate value and first derivatives at a specified abscissa. 165 * @return interpolated value and derivatives (value in row 0, 170 public T[][] derivatives(T x, int order) throws NoDataException, NullArgumentException { in derivatives() method in FieldHermiteInterpolator [all …]
|
H A D | BicubicSplineInterpolatingFunction.java | 44 * and function derivatives values 72 * Partial derivatives. 73 * The value of the first index determines the kind of derivatives: 74 * 0 = first partial derivatives wrt x 75 * 1 = first partial derivatives wrt y 76 * 2 = second partial derivatives wrt x 77 * 3 = second partial derivatives wrt y 78 * 4 = cross partial derivatives 121 * needed for calling any of the methods that compute the partial derivatives 203 // Compute all partial derivatives. in BicubicSplineInterpolatingFunction() [all …]
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/nonstiff/ |
H A D | AdamsNordsieckTransformer.java | 36 * classical representation with several previous first derivatives and Nordsieck 37 * representation with higher order scaled derivatives.</p> 39 * <p>We define scaled derivatives s<sub>i</sub>(n) at step n as: 49 * uses first derivatives only, i.e. it handles y<sub>n</sub>, s<sub>1</sub>(n) and 57 * higher degrees scaled derivatives all taken at the same step, i.e it handles y<sub>n</sub>, 139 /** Initialization matrix for the higher order derivatives wrt y'', y''' ... */ 142 … /** Update matrix for the higher order derivatives h<sup>2</sup>/2y'', h<sup>3</sup>/6 y''' ... */ 145 /** Update coefficients of the higher order derivatives wrt y'. */ 254 /** Initialize the high order scaled derivatives at step start. 256 * @param multistep scaled derivatives after step start (hy'1, ..., hy'k-1) [all …]
|
H A D | AdamsIntegrator.java | 97 /** Update the high order scaled derivatives for Adams integrators (phase 1). 98 * <p>The complete update of high order derivatives has a form similar to: 103 * @param highOrder high order scaled derivatives 105 * @return updated high order derivatives 112 /** Update the high order scaled derivatives Adams integrators (phase 2). 113 * <p>The complete update of high order derivatives has a form similar to: 119 * @param start first order scaled derivatives at step start 120 * @param end first order scaled derivatives at step end 121 * @param highOrder high order scaled derivatives, will be modified
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math3/ode/nonstiff/ |
H A D | AdamsNordsieckTransformer.java | 38 * classical representation with several previous first derivatives and Nordsieck 39 * representation with higher order scaled derivatives.</p> 41 * <p>We define scaled derivatives s<sub>i</sub>(n) at step n as: 51 * uses first derivatives only, i.e. it handles y<sub>n</sub>, s<sub>1</sub>(n) and 59 * higher degrees scaled derivatives all taken at the same step, i.e it handles y<sub>n</sub>, 141 …/** Update matrix for the higher order derivatives h<sup>2</sup>/2 y'', h<sup>3</sup>/6 y''' ... */ 144 /** Update coefficients of the higher order derivatives wrt y'. */ 246 /** Initialize the high order scaled derivatives at step start. 250 * @param yDot first steps derivatives 320 /** Update the high order scaled derivatives for Adams integrators (phase 1). [all …]
|
H A D | AdamsNordsieckFieldTransformer.java | 36 * classical representation with several previous first derivatives and Nordsieck 37 * representation with higher order scaled derivatives.</p> 39 * <p>We define scaled derivatives s<sub>i</sub>(n) at step n as: 49 * uses first derivatives only, i.e. it handles y<sub>n</sub>, s<sub>1</sub>(n) and 57 * higher degrees scaled derivatives all taken at the same step, i.e it handles y<sub>n</sub>, 146 …/** Update matrix for the higher order derivatives h<sup>2</sup>/2 y'', h<sup>3</sup>/6 y''' ... */ 149 /** Update coefficients of the higher order derivatives wrt y'. */ 247 /** Initialize the high order scaled derivatives at step start. 251 * @param yDot first steps derivatives 322 /** Update the high order scaled derivatives for Adams integrators (phase 1). [all …]
|
H A D | AdamsIntegrator.java | 102 /** Update the high order scaled derivatives for Adams integrators (phase 1). 103 * <p>The complete update of high order derivatives has a form similar to: 108 * @param highOrder high order scaled derivatives 110 * @return updated high order derivatives 117 /** Update the high order scaled derivatives Adams integrators (phase 2). 118 * <p>The complete update of high order derivatives has a form similar to: 124 * @param start first order scaled derivatives at step start 125 * @param end first order scaled derivatives at step end 126 * @param highOrder high order scaled derivatives, will be modified
|
H A D | AdamsFieldIntegrator.java | 112 /** Update the high order scaled derivatives for Adams integrators (phase 1). 113 * <p>The complete update of high order derivatives has a form similar to: 118 * @param highOrder high order scaled derivatives 120 * @return updated high order derivatives 127 /** Update the high order scaled derivatives Adams integrators (phase 2). 128 * <p>The complete update of high order derivatives has a form similar to: 134 * @param start first order scaled derivatives at step start 135 * @param end first order scaled derivatives at step end 136 * @param highOrder high order scaled derivatives, will be modified
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/jacobians/ |
H A D | StepInterpolatorWithJacobians.java | 99 * Get the partial derivatives of the state vector with respect to 104 * @return partial derivatives of the state vector with respect to 113 * Get the partial derivatives of the state vector with respect to 118 * @return partial derivatives of the state vector with respect to 127 * Get the time derivatives of the state vector of the interpolated point. 131 * @return derivatives of the state vector at time {@link #getInterpolatedTime} 139 * Get the time derivatives of the jacobian of the state vector 144 * @return time derivatives of the jacobian of the state vector 153 * Get the time derivatives of the jacobian of the state vector 158 * @return time derivatives of the jacobian of the state vector
|
/aosp_15_r20/external/mesa3d/src/panfrost/midgard/ |
H A D | midgard_derivatives.c | 30 /* Derivatives in Midgard are implemented on the texture pipe, rather than the 32 * instructions require (implicit) derivatives to be calculated anyway, so it 34 * texturing ops that calculate derivatives, there are two explicit texture ops 38 * One major caveat is that derivatives can only be calculated on up to a vec2 40 * derivatives will be vec2 (autocalculating mip levels of 2D texture 45 * generation), we generate texture ops 1:1 to the incoming NIR derivatives. 47 * scan for vec3/vec4 derivatives and lower (split) to multiple instructions. 72 /* Returns true if a texturing op computes derivatives either explicitly or 78 /* Only fragment shaders may compute derivatives, but the sense of in mir_op_computes_derivatives()
|
/aosp_15_r20/external/tensorflow/tensorflow/java/src/main/java/org/tensorflow/op/core/ |
H A D | Gradients.java | 31 * Adds operations to compute the partial derivatives of sum of {@code y}s w.r.t {@code x}s, 34 …* If {@code Options.dx()} values are set, they are as the initial symbolic partial derivatives of … 40 * The partial derivatives are returned in output {@code dy}, with the size of {@code x}. 60 * @param dx partial derivatives of some loss function {@code L} w.r.t. {@code y} 79 * @param x inputs of the function for which partial derivatives are computed 116 * @param x inputs of the function for which partial derivatives are computed 128 * @param dx partial derivatives of some loss function {@code L} w.r.t. {@code y} 142 * Partial derivatives of {@code y}s w.r.t. {@code x}s, with the size of {@code x}
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/ |
H A D | MultistepIntegrator.java | 34 * <p>We define scaled derivatives s<sub>i</sub>(n) at step n as: 43 * the Nordsieck vector with higher degrees scaled derivatives all taken at the same 67 /** Nordsieck matrix of the higher scaled derivatives. 240 /** Initialize the high order scaled derivatives at step start. 242 * @param multistep scaled derivatives after step start (hy'1, ..., hy'k-1) 244 * @return high order scaled derivatives at step start 301 /** Initialize the high order scaled derivatives at step start. 303 * @param multistep scaled derivatives after step start (hy'1, ..., hy'k-1) 305 * @return high order derivatives at step start 339 // compute the high order scaled derivatives in handleStep()
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/interpolation/ |
H A D | BicubicSplineInterpolatingFunction.java | 38 * and function derivatives values 66 * Partial derivatives 67 * The value of the first index determines the kind of derivatives: 68 * 0 = first partial derivatives wrt x 69 * 1 = first partial derivatives wrt y 70 * 2 = second partial derivatives wrt x 71 * 3 = second partial derivatives wrt y 72 * 4 = cross partial derivatives 259 * Compute all partial derivatives. 302 * function partial derivatives values at the four corners of a grid [all …]
|