add cast<newtype>() function to casts the scalars to another type.

This commit is contained in:
Benoit Jacob
2007-10-19 14:46:08 +00:00
parent d6f26dc8eb
commit 49c78643da
6 changed files with 77 additions and 3 deletions

View File

@@ -91,6 +91,8 @@ template<typename Scalar, typename Derived> class Object
return *static_cast<Derived*>(this);
}
template<typename NewScalar> Cast<NewScalar, Derived> cast() const;
Row<Derived> row(int i) const;
Column<Derived> col(int i) const;
Minor<Derived> minor(int row, int col) const;
@@ -102,7 +104,6 @@ template<typename Scalar, typename Derived> class Object
template<typename OtherDerived>
Scalar dot(const OtherDerived& other) const;
RealScalar norm2() const;
RealScalar norm() const;
ScalarMultiple<Derived> normalized() const;