.. index:: pair: class; gpr::pairlocal::TileEvaluator .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator: class gpr::pairlocal::TileEvaluator =================================== .. toctree:: :hidden: Overview ~~~~~~~~ One configuration pair of the joint covariance and its derivatives with respect to log m (parameter 0) and each log length (parameters 1..P, or the single parameter 1 for a shared length). :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class TileEvaluator { public: // construction :target:`TileEvaluator`(const :ref:`Geometry`& geometry, const :ref:`Weights`& weights); :ref:`TileEvaluator`(const :ref:`Geometry`& left, const :ref:`Geometry`& right, const :ref:`Weights`& weights); :ref:`TileEvaluator`(const :ref:`Geometry`& geometry, const :ref:`Weights`& weights, const std::vector& derivative_groups); :target:`TileEvaluator`(const :ref:`Geometry`& left, const :ref:`Geometry`& right, const :ref:`Weights`& weights, const std::vector& derivative_groups); // methods Eigen::Index :target:`tileSize`() const; Eigen::Index :ref:`parameterCount`() const; void :target:`prepare`(Eigen::Index i, Eigen::Index j); void :ref:`tile`(Eigen::Index parameter, Eigen::MatrixXd& out) const; void :ref:`directional`(const Eigen::VectorXd& direction, Eigen::MatrixXd& first, Eigen::MatrixXd& second) const; void :ref:`contract`(const double* W, Eigen::Index row_stride, Eigen::Index col_stride, bool lower_only, Eigen::VectorXd& out) const; void :ref:`quadratic`(const double* alpha_i, const double* alpha_j, Eigen::VectorXd& out) const; void :ref:`action`(const double* vector, bool transpose, Eigen::MatrixXd& out) const; void :ref:`diagonals`(Eigen::MatrixXd& out) const; }; .. _details-classgpr_1_1pairlocal_1_1_tile_evaluator: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ One configuration pair of the joint covariance and its derivatives with respect to log m (parameter 0) and each log length (parameters 1..P, or the single parameter 1 for a shared length). Construction ------------ .. index:: pair: function; TileEvaluator .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1abfd69d9e02c3edb75ee7331411f73a0e: .. ref-code-block:: cpp :class: doxyrest-title-code-block TileEvaluator(const :ref:`Geometry`& left, const :ref:`Geometry`& right, const :ref:`Weights`& weights) Cross tiles between the configurations of two geometries of the same atoms: i indexes ``left``, j indexes ``right``. .. index:: pair: function; TileEvaluator .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1a916fc82f1bc6d65f6793bc865547db51: .. ref-code-block:: cpp :class: doxyrest-title-code-block TileEvaluator(const :ref:`Geometry`& geometry, const :ref:`Weights`& weights, const std::vector& derivative_groups) Compact derivative groups, indexed by fine pair type. Each group parameter moves all of its members' log lengths together. Group IDs must cover 0..G-1; an empty map retains the fine-coordinate workspace. Methods ------- .. index:: pair: function; parameterCount .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1aceda0106d41bd50c80031fe03c83ce49: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::Index parameterCount() const 1 + number of log lengths. .. index:: pair: function; tile .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1ac5391692e5d7597c4bc32c6fba97d6e7: .. ref-code-block:: cpp :class: doxyrest-title-code-block void tile(Eigen::Index parameter, Eigen::MatrixXd& out) const The dense tile of parameter ``parameter`` (0 is the covariance itself, which equals its derivative with respect to log m). .. index:: pair: function; directional .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1a0a4feb7d266a70f52f5440756fb7c258: .. ref-code-block:: cpp :class: doxyrest-title-code-block void directional(const Eigen::VectorXd& direction, Eigen::MatrixXd& first, Eigen::MatrixXd& second) const Exact first and second derivatives along one packed log-parameter direction. :ref:`Pair ` products use their six-entry Cartesian support. .. index:: pair: function; contract .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1a0c149fe374afb2e00c15138d1530043a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void contract(const double* W, Eigen::Index row_stride, Eigen::Index col_stride, bool lower_only, Eigen::VectorXd& out) const Frobenius products of a weight tile with the covariance tile and every derivative tile: :ref:`out(p) ` = , :ref:`out(0) ` = . Entry (c, c') of W sits at W[c \* row_stride + c' \* col_stride]. When ``lower_only`` the tile is the diagonal tile i == j and only the entries with c >= c' are read. .. index:: pair: function; quadratic .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1abf79020eea28e57a7f9550a433b90b25: .. ref-code-block:: cpp :class: doxyrest-title-code-block void quadratic(const double* alpha_i, const double* alpha_j, Eigen::VectorXd& out) const alpha_i^T (dK/dtheta_p) alpha_j for every parameter, with the tiles of the two weight vectors given channel-contiguous. .. index:: pair: function; action .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1a77477ed750aca30f7c131a53043a258c: .. ref-code-block:: cpp :class: doxyrest-title-code-block void action(const double* vector, bool transpose, Eigen::MatrixXd& out) const Apply every derivative tile to one channel vector without materializing the tiles. :ref:`out(p, c) ` is the c-th component of (dK/dtheta_p) vector; transpose=true applies each transposed tile. Workspace is O(G D). .. index:: pair: function; diagonals .. _doxid-classgpr_1_1pairlocal_1_1_tile_evaluator_1a1887a6c949474fcb7c753cef1eb68e45: .. ref-code-block:: cpp :class: doxyrest-title-code-block void diagonals(Eigen::MatrixXd& out) const Diagonal of every parameter tile: :ref:`out(p, c) `. Meaningful for i == j, where the kernel nugget scales the diagonal.