File FirstND.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
namespace AutomaticDifferentiation
class FirstND : public Scine::Utils::AutomaticDifferentiation::FirstBase<Eigen::MatrixXd, FirstND>
#include <FirstND.h>

Class representing values in N dimensions and allowing for the automatic calculation of first derivatives in those N dimensions.

Public Functions

FirstND()

Constructor that takes no arguments.

FirstND(double v, Eigen::MatrixXd d)

Constructor that takes the value of the function as a double and the derivatives as an Eigen::MatrixXd.

void setZero()
int dimensions() const

Getter for the number of dimensions of the function.

Return

int Number of dimensions.

double derivative(int index) const

Getter for the derivative.

Return

double

Parameters
  • int: Index to the derivative that should be returned in the N dimensional derivatives object.