Linear algebra for scalar objects.
More...
#include <ScalarAlgebra.h>
Linear algebra for scalar objects.
Definition at line 13 of file ScalarAlgebra.h.
|
static bool | IsScalar (std::type_info const &obj_type) |
| Is a boost::any a scalar type (double, float, int, or unsigned int)? More...
|
|
static bool | IsZero (boost::any const &obj) |
| Determine if a scalar is zero. More...
|
|
static boost::any | Zero (std::type_info const &type) |
| Compute a zero scalar. More...
|
|
static double | Norm (boost::any const &obj) |
| Get the norm of a scalar (the magnitude) More...
|
|
static double | InnerProduct (boost::any const &vec1, boost::any const &vec2) |
| The inner product between two scalars. More...
|
|
static boost::any | OuterProduct (boost::any const &vec1, boost::any const &vec2) |
| The outer product between two scalars. More...
|
|
static boost::any | Identity (std::type_info const &type) |
| Compute an identity object for a scalar. More...
|
|
static boost::any | Add (boost::any const &in0, boost::any const &in1) |
| Add two scalars together. More...
|
|
static boost::any | Subtract (boost::any const &in0, boost::any const &in1) |
| Subtract two scalars. More...
|
|
static boost::any | Multiply (boost::any const &in0, boost::any const &in1) |
| Multiply two scalars. More...
|
|
static boost::any | Inverse (boost::any const &obj) |
| The inverse. More...
|
|
static boost::any | SquareRoot (boost::any const &obj) |
| Compute the square root of an object. More...
|
|
static double | LogDeterminate (boost::any const &obj) |
| Compute the log-determinate. More...
|
|
◆ ScalarAlgebra()
ScalarAlgebra::ScalarAlgebra |
( |
| ) |
|
◆ ~ScalarAlgebra()
ScalarAlgebra::~ScalarAlgebra |
( |
| ) |
|
|
virtual |
◆ Add() [1/3]
boost::any ScalarAlgebra::Add |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
static |
◆ Add() [2/3]
template<typename type0 , typename type1 >
static boost::any muq::Modeling::ScalarAlgebra::Add |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Add two scalars together.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The addition of in0 and in1 (in0+in1)
Definition at line 136 of file ScalarAlgebra.h.
◆ Add() [3/3]
template<typename type0 >
static boost::any muq::Modeling::ScalarAlgebra::Add |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Add two scalars together.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The addition of in0 and in1 (in0+in1)
Definition at line 150 of file ScalarAlgebra.h.
◆ Identity()
boost::any ScalarAlgebra::Identity |
( |
std::type_info const & |
type | ) |
|
|
static |
◆ InnerProduct()
double ScalarAlgebra::InnerProduct |
( |
boost::any const & |
vec1, |
|
|
boost::any const & |
vec2 |
|
) |
| |
|
static |
◆ Inverse()
boost::any ScalarAlgebra::Inverse |
( |
boost::any const & |
obj | ) |
|
|
static |
◆ IsScalar()
bool ScalarAlgebra::IsScalar |
( |
std::type_info const & |
obj_type | ) |
|
|
static |
Is a boost::any a scalar type (double, float, int, or unsigned int)?
- Parameters
-
[in] | obj_type | We want to know if this object type is a scalar type |
- Returns
- true: it is a scalar type, false: it is not a scalar type
Definition at line 9 of file ScalarAlgebra.cpp.
Referenced by muq::Modeling::AnyAlgebra::AccessElement(), muq::Modeling::AnyAlgebra::Add(), muq::Modeling::AnyAlgebra::Apply(), muq::Modeling::AnyAlgebra::ApplyInverse(), muq::Modeling::AnyAlgebra::Identity(), muq::Modeling::AnyAlgebra::InnerProduct(), muq::Modeling::AnyAlgebra::Inverse(), muq::Modeling::AnyAlgebra::IsZero(), muq::Modeling::AnyAlgebra::LogDeterminate(), muq::Modeling::AnyAlgebra::Multiply(), muq::Modeling::AnyAlgebra::Norm(), muq::Modeling::AnyAlgebra::OuterProduct(), muq::Modeling::AnyAlgebra::Size(), muq::Modeling::AnyAlgebra::SquareRoot(), muq::Modeling::AnyAlgebra::Subtract(), and muq::Modeling::AnyAlgebra::Zero().
◆ IsZero()
bool ScalarAlgebra::IsZero |
( |
boost::any const & |
obj | ) |
|
|
static |
◆ LogDeterminate()
double ScalarAlgebra::LogDeterminate |
( |
boost::any const & |
obj | ) |
|
|
static |
◆ Magnitude()
template<typename type >
static double muq::Modeling::ScalarAlgebra::Magnitude |
( |
boost::any const & |
obj | ) |
|
|
inlinestaticprivate |
The magnitude of a scalar.
- Parameters
-
[in] | obj | We need the magnitude of this scalar |
- Returns
- The magnitude
Definition at line 123 of file ScalarAlgebra.h.
◆ Multiply() [1/3]
boost::any ScalarAlgebra::Multiply |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
static |
◆ Multiply() [2/3]
template<typename type0 , typename type1 >
static boost::any muq::Modeling::ScalarAlgebra::Multiply |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Multiply two scalars.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The multiplication of in0 and in1 (in0*in1)
Definition at line 200 of file ScalarAlgebra.h.
◆ Multiply() [3/3]
template<typename type0 >
static boost::any muq::Modeling::ScalarAlgebra::Multiply |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Multiply two scalars.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The multiplication of in0 and in1 (in0*in1)
Definition at line 214 of file ScalarAlgebra.h.
◆ Norm()
double ScalarAlgebra::Norm |
( |
boost::any const & |
obj | ) |
|
|
static |
◆ OuterProduct()
boost::any ScalarAlgebra::OuterProduct |
( |
boost::any const & |
vec1, |
|
|
boost::any const & |
vec2 |
|
) |
| |
|
static |
◆ SquareRoot()
boost::any ScalarAlgebra::SquareRoot |
( |
boost::any const & |
obj | ) |
|
|
static |
◆ Subtract() [1/3]
boost::any ScalarAlgebra::Subtract |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
static |
◆ Subtract() [2/3]
template<typename type0 , typename type1 >
static boost::any muq::Modeling::ScalarAlgebra::Subtract |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Subtract two scalars.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The subtraction of in0 and in1 (in0-in1)
Definition at line 168 of file ScalarAlgebra.h.
◆ Subtract() [3/3]
template<typename type0 >
static boost::any muq::Modeling::ScalarAlgebra::Subtract |
( |
boost::any const & |
in0, |
|
|
boost::any const & |
in1 |
|
) |
| |
|
inlinestaticprivate |
Subtract two scalars.
- Parameters
-
[in] | in0 | The first input |
[in] | in1 | The second input |
- Returns
- The subtraction of in0 and in1 (in0-in1)
Definition at line 182 of file ScalarAlgebra.h.
◆ Zero()
boost::any ScalarAlgebra::Zero |
( |
std::type_info const & |
type | ) |
|
|
static |
The documentation for this class was generated from the following files: