Skip to content

Namespace inertialsim::analysis

Namespace List > inertialsim > analysis

Classes

Type Name
class AllanDeviation
struct NoiseModel

Public Functions

Type Name
bool ArrayClose (const Eigen::DenseBase< DerivedA > & test_input, const Eigen::DenseBase< DerivedB > & expected, double atol=geometry::kDefaultFpTolerance, double rtol=0.0, bool equal_nan=false)
Compare if two arrays are element-wise equal within a tolerance.
bool ArrayClose (const std::optional< Array > & test_input, const std::optional< Array > & expected, double atol=geometry::kDefaultFpTolerance, double rtol=0.0, bool equal_nan=false)
Compare two optional arrays for closeness within tolerance (ArrayXd).
bool ArrayClose (const std::optional< Matrix > & test_input, const std::optional< Matrix > & expected, double atol=geometry::kDefaultFpTolerance, double rtol=0.0, bool equal_nan=false)
Compare two optional matrices for closeness within tolerance (MatrixXd).
bool ArrayClose (const std::optional< SpecificationArray > & test_input, const std::optional< SpecificationArray > & expected, double atol=geometry::kDefaultFpTolerance, double rtol=0.0, bool equal_nan=false)
Compare two optional specification arrays for closeness within tolerance.
bool ArrayEqual (const Eigen::DenseBase< DerivedA > & test_input, const Eigen::DenseBase< DerivedB > & expected, bool equal_nan=false)
Compare for strict equality of two arrays (shape and contents).
bool ArrayEqual (const std::optional< Array > & test_input, const std::optional< Array > & expected, bool equal_nan=false)
Compare two optional arrays for strict equality (ArrayXd).
bool ArrayEqual (const std::optional< Matrix > & test_input, const std::optional< Matrix > & expected, bool equal_nan=false)
Compare two optional arrays for strict equality (MatrixXd).
bool ArrayEqual (const std::optional< SpecificationArray > & test_input, const std::optional< SpecificationArray > & expected, bool equal_nan=false)
Compare two optional specification arrays for strict equality.

Public Functions Documentation

function ArrayClose

Compare if two arrays are element-wise equal within a tolerance.

template<typename DerivedA, typename DerivedB>
bool inertialsim::analysis::ArrayClose (
    const Eigen::DenseBase< DerivedA > & test_input,
    const Eigen::DenseBase< DerivedB > & expected,
    double atol=geometry::kDefaultFpTolerance,
    double rtol=0.0,
    bool equal_nan=false
) 

Matches the behavior of numpy.allclose. absolute(a - b) <= (atol + rtol * absolute(b))

Parameters:

  • test_input Test array.
  • expected Reference array.
  • atol Absolute tolerance. Defaults to geometry::kDefaultFpTolerance.
  • rtol Relative tolerance. Defaults to 0.0 for exact comparison.
  • equal_nan Consider NaNs as equal.

Returns:

True if arrays are equal within tolerance.


function ArrayClose

Compare two optional arrays for closeness within tolerance (ArrayXd).

inline bool inertialsim::analysis::ArrayClose (
    const std::optional< Array > & test_input,
    const std::optional< Array > & expected,
    double atol=geometry::kDefaultFpTolerance,
    double rtol=0.0,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayClose.

Parameters:

  • test_input Optional test array.
  • expected Optional reference array.
  • atol Absolute tolerance.
  • rtol Relative tolerance.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have values close within tolerance.


function ArrayClose

Compare two optional matrices for closeness within tolerance (MatrixXd).

inline bool inertialsim::analysis::ArrayClose (
    const std::optional< Matrix > & test_input,
    const std::optional< Matrix > & expected,
    double atol=geometry::kDefaultFpTolerance,
    double rtol=0.0,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayClose.

Parameters:

  • test_input Optional test matrix.
  • expected Optional reference matrix.
  • atol Absolute tolerance.
  • rtol Relative tolerance.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have values close within tolerance.


function ArrayClose

Compare two optional specification arrays for closeness within tolerance.

inline bool inertialsim::analysis::ArrayClose (
    const std::optional< SpecificationArray > & test_input,
    const std::optional< SpecificationArray > & expected,
    double atol=geometry::kDefaultFpTolerance,
    double rtol=0.0,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayClose.

Parameters:

  • test_input Optional test array.
  • expected Optional reference array.
  • atol Absolute tolerance.
  • rtol Relative tolerance.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have values close within tolerance.


function ArrayEqual

Compare for strict equality of two arrays (shape and contents).

template<typename DerivedA, typename DerivedB>
bool inertialsim::analysis::ArrayEqual (
    const Eigen::DenseBase< DerivedA > & test_input,
    const Eigen::DenseBase< DerivedB > & expected,
    bool equal_nan=false
) 

Parameters:

  • test_input Test array.
  • expected Reference array.
  • equal_nan Consider NaNs as equal.

Returns:

True if test_input and expected are equal.


function ArrayEqual

Compare two optional arrays for strict equality (ArrayXd).

inline bool inertialsim::analysis::ArrayEqual (
    const std::optional< Array > & test_input,
    const std::optional< Array > & expected,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayEqual.

Parameters:

  • test_input Optional test array.
  • expected Optional reference array.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have equal values.


function ArrayEqual

Compare two optional arrays for strict equality (MatrixXd).

inline bool inertialsim::analysis::ArrayEqual (
    const std::optional< Matrix > & test_input,
    const std::optional< Matrix > & expected,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayEqual.

Parameters:

  • test_input Optional test matrix.
  • expected Optional reference matrix.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have equal values.


function ArrayEqual

Compare two optional specification arrays for strict equality.

inline bool inertialsim::analysis::ArrayEqual (
    const std::optional< SpecificationArray > & test_input,
    const std::optional< SpecificationArray > & expected,
    bool equal_nan=false
) 

If both are std::nullopt, returns true. If one is std::nullopt and the other isn't, returns false. Otherwise, compares the values using ArrayEqual.

Parameters:

  • test_input Optional test array.
  • expected Optional reference array.
  • equal_nan Consider NaNs as equal.

Returns:

True if both nullopt or both have equal values.



The documentation for this class was generated from the following file cpp/include/inertialsim/analysis/allan_deviation.h