5 #ifndef BPP_PHYL_LIKELIHOOD_DATAFLOW_DATAFLOWNUMERIC_H
6 #define BPP_PHYL_LIKELIHOOD_DATAFLOW_DATAFLOWNUMERIC_H
18 #include <type_traits>
32 template<
typename eVector,
typename bVector>
33 using ForConvert =
typename std::enable_if< ((std::is_same<bVector, Vdouble>::value
34 || std::is_same<bVector, std::vector<ExtendedFloat>>::value)
36 (std::is_same<eVector, Eigen::RowVectorXd>::value
37 || std::is_same<eVector, Eigen::VectorXd>::value)),
bool>::type;
39 template<
typename eVector,
43 const auto eigenRows =
static_cast<Eigen::Index
>(bppVector.size());
44 eigenVector.resize (eigenRows);
45 for (Eigen::Index i = 0; i < eigenRows; ++i)
47 eigenVector (i) =
convert(bppVector[
size_t(i)]);
51 extern template void copyBppToEigen (
const std::vector<ExtendedFloat>& bppVector, Eigen::VectorXd& eigenVector);
52 extern template void copyBppToEigen (
const std::vector<ExtendedFloat>& bppVector, Eigen::RowVectorXd& eigenVector);
59 template<
typename eVector>
60 using EFVector =
typename std::enable_if<(std::is_same<eVector, ExtendedFloatRowVectorXd>::value
61 || std::is_same<eVector, ExtendedFloatVectorXd>::value),
bool>::type;
63 template<
typename eVector, EFVector<eVector> = true>
64 void copyBppToEigen (
const std::vector<ExtendedFloat>& bppVector, eVector& eigenVector)
68 return lhs.exponent_part() < rhs.exponent_part();
71 eigenVector.exponent_part() = maxE;
72 eigenVector.float_part() = Eigen::RowVectorXd::NullaryExpr(
static_cast<Eigen::Index
>(bppVector.size()),
73 [&maxE, &bppVector](
int i){
74 return bppVector[(size_t)i].float_part() * bpp::constexpr_power<double>(bpp::ExtendedFloat::radix, bppVector[(size_t)i].exponent_part () - maxE);
85 template<
typename eVector>
86 using EFoutput =
typename std::enable_if<(std::is_same<eVector, ExtendedFloatRowVectorXd>::value
87 || std::is_same<eVector, ExtendedFloatVectorXd>::value),
bool>::type;
89 template<
typename eVector,
94 eigenVector.exponent_part() = 0;
96 eigenVector.normalize();
109 extern void copyBppToEigen (
const std::vector<Eigen::VectorXd>& bppVector, Eigen::MatrixXd& eigenMatrix);
117 template<
typename eType,
118 typename =
typename std::enable_if<(std::is_same<eType, double>::value
119 || std::is_same<eType, ExtendedFloat>::value)>::type>
122 const auto eigenRows =
static_cast<std::size_t
>(eigenMatrix.
rows());
123 const auto eigenCols =
static_cast<std::size_t
>(eigenMatrix.
cols());
125 bppMatrix.resize (eigenRows);
126 for (
size_t i = 0; i < eigenRows; ++i)
128 bppMatrix[i].resize (eigenCols);
129 auto bMi = &bppMatrix[i];
130 for (
size_t j = 0; j < eigenCols; ++j)
132 (*bMi)[j] =
convert(eigenMatrix (
static_cast<Eigen::Index
>(i),
static_cast<Eigen::Index
>(j)));
141 template<
typename eType,
142 typename =
typename std::enable_if<(std::is_same<eType, double>::value
143 || std::is_same<eType, ExtendedFloat>::value)>::type>
144 void copyEigenToBpp (
const Eigen::MatrixXd& eigenMatrix, std::vector<std::vector<eType>>& bppMatrix)
146 const auto eigenRows =
static_cast<std::size_t
>(eigenMatrix.rows());
147 const auto eigenCols =
static_cast<std::size_t
>(eigenMatrix.cols());
149 bppMatrix.resize (eigenRows);
150 for (
size_t i = 0; i < eigenRows; ++i)
152 bppMatrix[i].resize (eigenCols);
153 auto bMi = &bppMatrix[i];
154 for (
size_t j = 0; j < eigenCols; ++j)
156 (*bMi)[j] = eigenMatrix (
static_cast<Eigen::Index
>(i),
static_cast<Eigen::Index
>(j));
162 extern template void copyEigenToBpp(
const Eigen::MatrixXd& eigenMatrix, std::vector<std::vector<double>>& bppMatrix);
163 extern template void copyEigenToBpp(
const Eigen::MatrixXd& eigenMatrix, std::vector<std::vector<bpp::ExtendedFloat>>& bppMatrix);
169 template<
typename eVector,
typename bVector>
170 using ForConvert2 =
typename std::enable_if< ((std::is_same<bVector, Vdouble>::value
171 || std::is_same<bVector, std::vector<ExtendedFloat>>::value)
173 (std::is_same<eVector, Eigen::RowVectorXd>::value
174 || std::is_same<eVector, Eigen::VectorXd>::value
175 || std::is_same<eVector, ExtendedFloatVectorXd>::value
176 || std::is_same<eVector, ExtendedFloatRowVectorXd>::value)),
bool>::type;
179 template<
typename eVector,
183 bppVector.resize(
size_t(eigenVector.size()));
184 for (
auto i = 0; i < eigenVector.size(); i++)
186 bppVector[(size_t)i] =
convert(eigenVector(i));
192 extern template void copyEigenToBpp (
const RowLik& eigenVector, std::vector<ExtendedFloat>& bppVector);
257 template<
typename Derived>
261 template<
typename Derived>
290 std::string
to_string (
const MatrixDimension& dim);
292 std::size_t
hash (
const MatrixDimension& dim);
406 template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
412 template<
typename T =
void>
418 template<
typename T =
void>
424 template<
typename T =
void>
427 return *std::make_shared<Parameter>(
"Zero", 0);
430 template<
typename T =
void>
436 template<
typename T,
int Rows,
int Cols>
438 -> decltype (Eigen::Matrix<T, Rows, Cols>::Zero (dim.rows, dim.cols))
440 return Eigen::Matrix<T, Rows, Cols>::Zero (dim.rows, dim.cols);
443 template<
int R,
int C,
template<
int R2 = R,
int C2 = C>
class MatType >
450 template<
typename T =
void>
460 template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
466 template<
typename T =
void>
472 template<
typename T =
void>
478 template<
typename T =
void>
481 return *std::make_shared<Parameter>(
"One", 1);
484 template<
typename T =
void>
490 template<
typename T,
int Rows,
int Cols>
492 -> decltype (Eigen::Matrix<T, Rows, Cols>::Ones (dim.rows, dim.cols))
494 return Eigen::Matrix<T, Rows, Cols>::Ones (dim.rows, dim.cols);
497 template<
int R,
int C,
template<
int R2 = 2,
int C2 = C>
class MatType>
504 template<
typename T =
void>
513 template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
519 template<typename T, typename = typename std::enable_if<std::is_same<T, ExtendedFloat>::value>::type>
525 template<
typename T,
int Rows,
int Cols>
527 -> decltype (Eigen::Matrix<T, Rows, Cols>::Identity (dim.rows, dim.cols))
530 return Eigen::Matrix<T, Rows, Cols>::Identity (dim.rows, dim.cols);
533 template<
int R,
int C,
template<
int R2 = R,
int C2 = C>
class MatType>
554 template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value || std::is_same<T, ExtendedFloat>::value>::type>
560 template<
typename T =
void>
566 template<
typename Derived>
570 return dim.rows == dim.cols && m ==
identity (dim);
573 template<
int R,
int C,
template<
int R2 = R,
int C2 = C>
class MatType>
596 template<typename R, typename F, typename = typename std::enable_if<std::is_arithmetic<R>::value || std::is_same<R, ExtendedFloat>::value>::type>
602 template<
typename T,
int Rows,
int Cols,
typename F,
603 typename =
typename std::enable_if<std::is_arithmetic<F>::value>::type>
605 -> decltype (Eigen::Matrix<T, Rows, Cols>::Constant (dim.rows, dim.cols, from))
608 return Eigen::Matrix<T, Rows, Cols>::Constant (dim.rows, dim.cols, from);
611 template<
int R,
int C,
template<
int R2 = R,
int C2 = C>
class MatType,
typename F,
612 typename =
typename std::enable_if<std::is_same<F, ExtendedFloat>::value || std::is_arithmetic<F>::value>::type>
629 template<
typename T,
int R,
int C,
typename DerivedF>
630 const Eigen::Matrix<T, R, C>
convert (
const Eigen::MatrixBase<DerivedF>& from,
631 const Dimension<Eigen::Matrix<T, R, C>>& dim,
632 typename std::enable_if<std::is_same<DerivedF, Eigen::RowVectorXi>::value || std::is_same<DerivedF, Eigen::VectorXi>::value>::type* = 0)
634 return from.derived().template cast<T>();
638 template<
int R,
int C,
typename DerivedF>
641 typename std::enable_if<std::is_same<DerivedF, Eigen::RowVectorXi>::value || std::is_same<DerivedF, Eigen::VectorXi>::value>::type* = 0)
652 template<
typename T,
int Rows,
int Cols,
typename DerivedF>
653 const DerivedF&
convert (
const Eigen::MatrixBase<DerivedF>& from,
654 const Dimension<Eigen::Matrix<T, Rows, Cols>>& dim,
655 typename std::enable_if<!(std::is_same<DerivedF, Eigen::RowVectorXi>::value || std::is_same<DerivedF, Eigen::VectorXi>::value)>::type* = 0)
657 return from.derived ();
660 template<
int R,
int C,
typename DerivedF>
663 typename std::enable_if<!(std::is_same<DerivedF, Eigen::RowVectorXi>::value || std::is_same<DerivedF, Eigen::VectorXi>::value)>::type* = 0)
672 template<
int R,
int C,
typename DerivedF>
679 template<
int R,
int C>
681 const Dimension<Eigen::Matrix<double, R, C>>& dim)
690 template<
typename R,
typename F>
715 template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
728 template<
typename Derived>
731 return Derived(base.
derived().float_part().inverse(), -base.
derived().exponent_part());
739 template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
746 template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
764 std::string
debug (
const T& t,
typename std::enable_if<std::is_arithmetic<T>::value>::type* = 0)
768 return "value=" + to_string_with_precision<T>(t, 20);
776 return "value=" + to_string_with_precision<double>(t.
getValue(), 20);
779 template<
typename T = std::
string>
780 std::string
debug (
const std::string& t)
786 template<
typename T = ExtendedFloat>
793 template<
typename Derived>
794 std::string
debug (
const Eigen::MatrixBase<Derived>& m)
799 std::string props =
"dim=" +
to_string (dim) +
" props={";
800 const auto zero_value =
zero (dim);
809 if (m.array ().isNaN ().any ())
811 if (m.array ().isInf ().any ())
813 if ((m.array () == zero_value.array ()).any ())
815 if ((m.array () > zero_value.array ()).any ())
817 if ((m.array () < zero_value.array ()).any ())
823 template<
typename Derived>
831 template<
typename T = TransitionFunction>
835 return "TransitionFunction";
843 std::size_t
hash (T t,
typename std::enable_if<std::is_floating_point<T>::value || std::is_integral<T>::value>::type* = 0)
845 return std::hash<T>{}(t);
855 template<
typename T = std::
string>
856 std::size_t
hash (
const std::string& t)
858 return std::hash<std::string>{}(t);
861 template<
typename Derived> std::size_t
hash (
const Eigen::MatrixBase<Derived>& m)
863 std::size_t seed = 0;
864 for (Eigen::Index j = 0; j < m.cols (); ++j)
866 for (Eigen::Index i = 0; i < m.rows (); ++i)
874 template<
typename Derived>
877 std::size_t seed =
hash(efm.
derived().float_part());
905 template<
typename Result,
typename From>
class Convert;
910 auto new_end = std::remove_if (deps.begin (), deps.end (), std::move (p));
911 deps.erase (new_end, deps.end ());
980 return cachedAs<Self>(c, std::make_shared<Self>(dim));
1004 const auto* derived =
dynamic_cast<const Self*
>(&other);
1005 return derived !=
nullptr &&
targetDimension_ == derived->targetDimension_;
1015 return this->shared_from_this ();
1021 return this->shared_from_this ();
1027 using namespace numeric;
1048 return cachedAs<Self>(c, std::make_shared<Self>(dim));
1071 const auto* derived =
dynamic_cast<const Self*
>(&other);
1072 return derived !=
nullptr &&
targetDimension_ == derived->targetDimension_;
1088 return this->shared_from_this ();
1094 using namespace numeric;
1114 template<
typename ... Args>
static std::shared_ptr<Self>
create (
Context& c, Args&&... args)
1116 return cachedAs<Self>(c, std::make_shared<Self>(std::forward<Args>(args)...));
1119 template<
typename ... Args>
1127 using namespace numeric;
1133 using namespace numeric;
1144 using namespace numeric;
1164 const auto* derived =
dynamic_cast<const Self*
>(&other);
1165 return derived !=
nullptr && this->
accessValueConst () == derived->accessValueConst ();
1170 using namespace numeric;
1187 return this->shared_from_this ();
1212 template<
typename ... Args>
static std::shared_ptr<Self>
create (
Context&, Args&&... args)
1214 return std::make_shared<Self>(std::forward<Args>(args)...);
1217 template<
typename ... Args>
1226 this->
modify ([&t](T& v) { v = t; },
true);
1232 this->
modify ([&t](T& v) { v = std::move (t); },
true);
1237 using namespace numeric;
1243 using namespace numeric;
1260 return this->shared_from_this ();
1290 checkNthDependencyIsValue<DepF>(
typeid (
Self), deps, 0);
1292 if (std::is_same<R, F>::value)
1294 return convertRef<Value<R>>(deps[0]);
1306 return cachedAs<Value<R>>(c, std::make_shared<Self>(std::move (deps), dim));
1315 using namespace numeric;
1322 return dynamic_cast<const Self*
>(&other) !=
nullptr;
1342 using namespace numeric;
1344 const auto& arg = accessValueConstCast<DepF>(*this->
dependency (0));
1371 checkNthDependencyIsValue<R>(
typeid (
Self), deps, 0);
1373 return cachedAs<Value<R>>(c, std::make_shared<Self>(std::move (deps), dim,
id));
1381 using namespace numeric;
1388 auto oself =
dynamic_cast<const Self*
>(&other);
1389 if (oself ==
nullptr)
1392 return id_ == oself->
id_;
1412 using namespace numeric;
1414 result = accessValueConstCast<R>(*this->
dependency (0));
r = 1 for each component.
ConstantOne(const Dimension< T > &dim)
static std::shared_ptr< Self > create(Context &c, const Dimension< T > &dim)
Build a new ConstantOne node of the given dimension.
Dimension< T > targetDimension_
bool hasNumericalProperty(NumericalProperty prop) const final
Test if the node has the given numerical property.
std::size_t hashAdditionalArguments() const final
Return the hash of node-specific configuration.
NodeRef recreate(Context &, NodeRefVec &&deps) final
Recreate the node with different dependencies.
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
void compute() final
Computation implementation.
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
bool compareAdditionalArguments(const Node_DF &other) const final
Compare node-specific configuration to another.
const VectorLik & operator()(const VectorLik &)
ConstantTransitionFunction(const VectorLik &res)
ConstantTransitionFunction(double val, int row)
r = 0 for each component.
std::size_t hashAdditionalArguments() const final
Return the hash of node-specific configuration.
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
bool hasNumericalProperty(NumericalProperty prop) const final
Test if the node has the given numerical property.
NodeRef recreate(Context &, NodeRefVec &&deps) final
Recreate the node with different dependencies.
void compute() final
Computation implementation.
Dimension< T > targetDimension_
static std::shared_ptr< Self > create(Context &c, const Dimension< T > &dim)
Build a new ConstantZero node of the given dimension.
ConstantZero(const Dimension< T > &dim)
bool compareAdditionalArguments(const Node_DF &other) const final
Compare node-specific configuration to another.
Context for dataflow node construction.
typename NumericalDependencyTransform< F >::DepType DepF
bool compareAdditionalArguments(const Node_DF &other) const final
Compare node-specific configuration to another.
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
NodeRef recreate(Context &c, NodeRefVec &&deps) final
Recreate the node with different dependencies.
static ValueRef< R > create(Context &c, NodeRefVec &&deps, const Dimension< R > &dim)
Build a new Convert node with the given output dimensions.
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
Dimension< R > targetDimension_
Convert(NodeRefVec &&deps, const Dimension< R > &dim)
void compute() final
Computation implementation.
static Self Constant(Eigen::Index rows, Eigen::Index cols, double value)
virtual const ExtType & exponent_part() const
virtual const MatType & float_part() const
static Self Zero(Eigen::Index rows, Eigen::Index cols)
Eigen::Index cols() const
Eigen::Index rows() const
static Self Identity(Eigen::Index rows)
static Self Ones(Eigen::Index rows, Eigen::Index cols)
const FloatType & float_part() const noexcept
const ExtType & exponent_part() const noexcept
static constexpr int radix
static ValueRef< R > create(Context &c, NodeRefVec &&deps, const Dimension< R > &dim, size_t id=0)
Build a new Convert node with the given output dimensions.
NodeRef recreate(Context &c, NodeRefVec &&deps) final
Recreate the node with different dependencies.
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
Identity(NodeRefVec &&deps, const Dimension< R > &dim, size_t id)
Dimension< R > targetDimension_
bool compareAdditionalArguments(const Node_DF &other) const final
Compare node-specific configuration to another.
void compute() final
Computation implementation.
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
Base dataflow Node class.
virtual std::string description() const
Node pretty name (default = type name).
const NodeRef & dependency(std::size_t i) const noexcept
void makeValid() noexcept
bool compareAdditionalArguments(const Node_DF &other) const override
Compare node-specific configuration to another.
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
NodeRef recreate(Context &, NodeRefVec &&deps) override
Recreate the node with different dependencies.
bool hasNumericalProperty(NumericalProperty prop) const final
Test if the node has the given numerical property.
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
std::size_t hashAdditionalArguments() const override
Return the hash of node-specific configuration.
std::string color() const override
void compute() final
Computation implementation.
NumericConstant(Args &&... args)
std::string description() const override
Node pretty name (default = type name).
static std::shared_ptr< Self > create(Context &c, Args &&... args)
Build a new NumericConstant node with T(args...) value.
NodeRef recreate(Context &, NodeRefVec &&deps) final
Recreate the node with different dependencies.
std::string debugInfo() const override
Node debug info (default = ""): user defined detailed info for DF graph debug.
void setValue(T &&t)
Setter with invalidation (movable value version).
NodeRef derive(Context &c, const Node_DF &node) final
Returns a node computing d(this_node_expression)/d(node_expression).
static std::shared_ptr< Self > create(Context &, Args &&... args)
Build a new NumericMutable node with T(args...) value.
void compute() final
Computation implementation.
std::string description() const override
Node pretty name (default = type name).
NumericMutable(Args &&... args)
void setValue(const T &t)
Setter with invalidation.
virtual double getValue() const
Abstract Node storing a value of type T.
const T & accessValueConst() const noexcept
Raw value access (const).
void modify(Callable &&modifier, bool makeValid)
General case for modification of the T object.
T & accessValueMutable() noexcept
bool isinf(const ExtendedFloat &d)
T identity(const Dimension< T > &)
std::size_t hash(T t, typename std::enable_if< std::is_floating_point< T >::value||std::is_integral< T >::value >::type *=0)
bool isinf(const double &d)
T one(const Dimension< T > &)
TransitionFunction one(const Dimension< TransitionFunction > &dim)
std::string debug(const TransitionFunction &f)
bool isIdentity(const T &t)
TransitionFunction zero(const Dimension< TransitionFunction > &dim)
bool isIdentity(const ExtendedFloatEigen< R, C, MatType > &efm)
void checkDimensionIsSquare(const MatrixDimension &dim)
std::string debug(const T &t, typename std::enable_if< std::is_arithmetic< T >::value >::type *=0)
R convert(const F &from, const Dimension< R > &)
T zero(const Dimension< T > &)
Derived inverse(ExtendedFloatEigenBase< Derived > base)
Defines the basic types of data flow nodes.
void removeDependenciesIf(NodeRefVec &deps, Predicate p)
std::size_t hash(const MatrixDimension &dim)
std::vector< double > Vdouble
NumericConstant< char > NodeX('X')
std::shared_ptr< Value< T > > ValueRef
Shared pointer alias for Value<T>.
void checkDependenciesNotNull(const std::type_info &contextNodeType, const NodeRefVec &deps)
Checks that all dependencies are not null, throws if not.
bool operator!=(const NoDimension &, const NoDimension &)
typename std::enable_if<(std::is_same< eVector, ExtendedFloatRowVectorXd >::value||std::is_same< eVector, ExtendedFloatVectorXd >::value), bool >::type EFoutput
bool operator==(const Matrix< Scalar > &m1, const Matrix< Scalar > &m2)
ExtendedFloatVectorXd VectorLik
ExtendedFloatRowVectorXd RowLik
std::string to_string(const NoDimension &)
ExtendedFloatMatrixXd MatrixLik
ExtendedFloat pow(const ExtendedFloat &ef, double exp)
void checkRecreateWithoutDependencies(const std::type_info &contextNodeType, const NodeRefVec &deps)
typename std::enable_if<(std::is_same< eVector, ExtendedFloatRowVectorXd >::value||std::is_same< eVector, ExtendedFloatVectorXd >::value), bool >::type EFVector
ExtendedFloatRowVector< Eigen::Dynamic > ExtendedFloatRowVectorXd
void failureDeltaNotDerivable(const std::type_info &contextNodeType)
template void copyEigenToBpp(const ExtendedFloatMatrixXd &eigenMatrix, std::vector< std::vector< double >> &bppMatrix)
typename std::enable_if<((std::is_same< bVector, Vdouble >::value||std::is_same< bVector, std::vector< ExtendedFloat > >::value) &&(std::is_same< eVector, Eigen::RowVectorXd >::value||std::is_same< eVector, Eigen::VectorXd >::value)), bool >::type ForConvert
std::vector< NodeRef > NodeRefVec
Alias for a dependency vector (of NodeRef).
template void copyBppToEigen(const std::vector< ExtendedFloat > &bppVector, Eigen::RowVectorXd &eigenVector)
NumericalProperty
Numerical properties for DF Node.
double convert(const bpp::ExtendedFloat &ef)
void checkDependencyVectorSize(const std::type_info &contextNodeType, const NodeRefVec &deps, std::size_t expectedSize)
void combineHash(std::size_t &seed, const T &t)
Combine hashable value to a hash, from Boost library.
void failureNumericalDerivationNotConfigured()
void failureComputeWasCalled(const std::type_info &nodeType)
std::shared_ptr< Node_DF > NodeRef
std::function< VectorLik(const VectorLik &)> TransitionFunction
ExtendedFloatMatrix< Eigen::Dynamic, Eigen::Dynamic > ExtendedFloatMatrixXd
ExtendedFloatVector< Eigen::Dynamic > ExtendedFloatVectorXd
typename std::enable_if<((std::is_same< bVector, Vdouble >::value||std::is_same< bVector, std::vector< ExtendedFloat > >::value) &&(std::is_same< eVector, Eigen::RowVectorXd >::value||std::is_same< eVector, Eigen::VectorXd >::value||std::is_same< eVector, ExtendedFloatVectorXd >::value||std::is_same< eVector, ExtendedFloatRowVectorXd >::value)), bool >::type ForConvert2
Dimension(const MatrixDimension &dim)
Dimension(const MatrixDimension &dim)
Dimension(const ExtendedFloat &)
Dimension(const Parameter &)
Dimension(Eigen::Index rows_)
Dimension(const double &)
Dimension(const size_t &)
Dimension(const std::string &)
Store a dimension for type T.
Basic matrix dimension type.
MatrixDimension(const ExtendedFloatEigenBase< Derived > &m)
MatrixDimension(Eigen::Index rows_, Eigen::Index cols_)
MatrixDimension(int rows_, int cols_)
MatrixDimension(size_t rows_, size_t cols_)
MatrixDimension()=default
MatrixDimension(const Eigen::MatrixBase< Derived > &m)
Empty type representing no dimensions.
RowVectorDimension(int cols_)
RowVectorDimension(Eigen::Index cols_)
RowVectorDimension(size_t cols_)
The T dependency should be transposed before computation.
VectorDimension(int rows_)
VectorDimension(Eigen::Index rows_)
VectorDimension(size_t rows_)