25 AnyMat(std::shared_ptr<boost::any> objIn);
27 unsigned Size(
const int dim=-1);
60 std::shared_ptr<boost::any>
obj;
68 static unsigned int Size(boost::any
const& obj,
int const dim=-1);
76 double Norm(boost::any
const& obj)
const;
84 double InnerProduct(boost::any
const& vec1, boost::any
const& vec2)
const;
92 boost::any
OuterProduct(boost::any
const& vec1, boost::any
const& vec2)
const;
102 boost::any
AccessElement(boost::any
const& obj,
unsigned int const i = 0,
unsigned int const j = 0)
const;
110 boost::any
Zero(std::type_info
const& type,
unsigned int const rows = 0,
unsigned int const cols = 0)
const;
117 bool IsZero(boost::any
const& obj)
const;
127 boost::any
Identity(std::type_info
const& type,
unsigned int const rows=0,
unsigned int const cols=0)
const;
137 boost::any
Identity(std::type_index
const& type,
unsigned int const rows=0,
unsigned int const cols=0)
const;
145 boost::any
Add(boost::any
const& in0, boost::any
const& in1)
const;
153 boost::any
Subtract(boost::any
const& in0, boost::any
const& in1)
const;
161 boost::any
Multiply(boost::any
const& in0, boost::any
const& in1)
const;
170 boost::any
ApplyInverse(boost::any
const& A, boost::any
const& x)
const;
179 boost::any
Apply(boost::any
const& A, boost::any
const& x)
const;
186 boost::any
Inverse(boost::any
const& obj)
const;
210 boost::any
Concatenate(boost::any
const& vec1, boost::any
const& vec2)
const;
220 virtual unsigned int SizeImpl(boost::any
const& obj)
const;
227 virtual double NormImpl(boost::any
const& obj)
const;
261 virtual boost::any
IdentityImpl(std::type_index
const& type,
unsigned int const rows,
unsigned int const cols)
const;
270 virtual boost::any
AddImpl(boost::any
const& in0, boost::any
const& in1)
const;
279 virtual boost::any
SubtractImpl(boost::any
const& in0, boost::any
const& in1)
const;
288 virtual boost::any
MultiplyImpl(boost::any
const& in0, boost::any
const& in1)
const;
297 virtual boost::any
ApplyImpl(boost::any
const& A, boost::any
const& x)
const;
314 virtual boost::any
ZeroImpl(std::type_info
const& type,
unsigned int const rows,
unsigned int const cols)
const;
352 virtual boost::any
ConcatenateImpl(boost::any
const& vec1, boost::any
const& vec2)
const;
Implement a generic way to do algebric operations on boost::any's.
virtual boost::any ApplyInverseImpl(boost::any const &A, boost::any const &x) const
Apply the inverse of a matrix.
virtual boost::any OuterProductImpl(boost::any const &vec1, boost::any const &vec2) const
The outer product between two vectors.
double InnerProduct(boost::any const &vec1, boost::any const &vec2) const
The inner product between two vectors.
boost::any Zero(std::type_info const &type, unsigned int const rows=0, unsigned int const cols=0) const
Compute a zero vector.
virtual boost::any ApplyImpl(boost::any const &A, boost::any const &x) const
Apply a matrix (mat-vec)
boost::any ApplyInverse(boost::any const &A, boost::any const &x) const
Apply the inverse of a matrix.
boost::any Apply(boost::any const &A, boost::any const &x) const
Apply a matrix (mat-vec)
virtual boost::any IdentityImpl(std::type_index const &type, unsigned int const rows, unsigned int const cols) const
Compute an identity object.
virtual unsigned int SizeImpl(boost::any const &obj) const
The size of an object (implemented by a child for non standard types)
boost::any AccessElement(boost::any const &obj, unsigned int const i=0, unsigned int const j=0) const
Access an element of a vector/matrix.
virtual boost::any AccessElementImpl(boost::any const &vec, unsigned int const i) const
Access an element of a vector.
static unsigned int Size(boost::any const &obj, int const dim=-1)
boost::any SquareRoot(boost::any const &obj) const
Compute the square root of an object.
virtual boost::any SubtractImpl(boost::any const &in0, boost::any const &in1) const
Subtract two objects.
bool IsZero(boost::any const &obj) const
Determine if an object is the zero object.
boost::any Inverse(boost::any const &obj) const
The inverse.
boost::any Subtract(boost::any const &in0, boost::any const &in1) const
Subtract two objects.
boost::any Add(boost::any const &in0, boost::any const &in1) const
Add two objects together.
boost::any Identity(std::type_index const &type, unsigned int const rows=0, unsigned int const cols=0) const
Compute an identity object.
virtual boost::any ConcatenateImpl(boost::any const &vec1, boost::any const &vec2) const
Combine to vectors into one.
boost::any Identity(std::type_info const &type, unsigned int const rows=0, unsigned int const cols=0) const
Compute an identity object.
virtual double InnerProductImpl(boost::any const &vec1, boost::any const &vec2) const
The inner product between two vectors.
double Norm(boost::any const &obj) const
The norm of an object.
virtual double NormImpl(boost::any const &obj) const
The norm of an object.
boost::any OuterProduct(boost::any const &vec1, boost::any const &vec2) const
The outer product between two vectors.
double LogDeterminate(boost::any const &obj) const
Compute the log-determinate.
boost::any Multiply(boost::any const &in0, boost::any const &in1) const
Multiply two objects.
virtual boost::any MultiplyImpl(boost::any const &in0, boost::any const &in1) const
Multiply two objects.
boost::any Concatenate(boost::any const &vec1, boost::any const &vec2) const
Combine to vectors into one.
virtual boost::any AddImpl(boost::any const &in0, boost::any const &in1) const
Add two objects together.
virtual boost::any InverseImpl(boost::any const &obj) const
The inverse.
virtual double LogDeterminateImpl(boost::any const &obj) const
Compute the log-determinate.
virtual boost::any ZeroImpl(std::type_info const &type, unsigned int const rows, unsigned int const cols) const
Compute a zero object for boost::any.
virtual boost::any SquareRootImpl(boost::any const &obj) const
Compute the square root of an object.
virtual bool IsZeroImpl(boost::any const &obj) const
Determine if an object is the zero object.
AnyMat Concatenate(AnyMat const &otherMat, int axis=-1) const
AnyMat Identity(int rows, int cols) const
AnyMat & operator+=(AnyMat const &otherMat)
AnyMat Zero(int rows, int cols=-1) const
AnyMat operator=(AnyMat const &otherMat)
double LogDeterminant() const
AnyMat Ones(int rows, int cols=-1) const
AnyMat operator+(AnyMat const &otherMat) const
AnyMat & operator-=(AnyMat const &otherMat)
unsigned Size(const int dim=-1)
AnyMat(std::shared_ptr< boost::any > objIn)
AnyMat Solve(AnyMat const &rhs)
double operator(int i, int j=-1) const
AnyMat operator*(AnyMat const &otherMat) const
double & operator(int i, int j=-1)
std::shared_ptr< boost::any > obj
AnyMat operator-(AnyMat const &otherMat) const