mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
cleanup: remove copy contructors when the compiler is able to generate a satisfactory
default copy constructor; remove useless static_cast's; some misc cleanup.
This commit is contained in:
parent
86220784b6
commit
42f6590bb2
@ -64,10 +64,6 @@ template<typename MatrixType, int BlockRows, int BlockCols> class Block
|
|||||||
&& startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols());
|
&& startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Block(const Block& other)
|
|
||||||
: m_matrix(other.m_matrix),
|
|
||||||
m_startRow(other.m_startRow), m_startCol(other.m_startCol) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -56,9 +56,6 @@ template<typename NewScalar, typename MatrixType> class Cast : NoOperatorEquals,
|
|||||||
|
|
||||||
Cast(const MatRef& matrix) : m_matrix(matrix) {}
|
Cast(const MatRef& matrix) : m_matrix(matrix) {}
|
||||||
|
|
||||||
Cast(const Cast& other)
|
|
||||||
: m_matrix(other.m_matrix) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -78,7 +75,7 @@ template<typename NewScalar, typename MatrixType> class Cast : NoOperatorEquals,
|
|||||||
/** \returns an expression of *this with the \a Scalar type casted to
|
/** \returns an expression of *this with the \a Scalar type casted to
|
||||||
* \a NewScalar.
|
* \a NewScalar.
|
||||||
*
|
*
|
||||||
* \param NewScalar the type we are casting the scalars to
|
* The template parameter \a NewScalar is the type we are casting the scalars to.
|
||||||
*
|
*
|
||||||
* Example: \include MatrixBase_cast.cpp
|
* Example: \include MatrixBase_cast.cpp
|
||||||
* Output: \verbinclude MatrixBase_cast.out
|
* Output: \verbinclude MatrixBase_cast.out
|
||||||
@ -90,7 +87,7 @@ template<typename NewScalar>
|
|||||||
const Cast<NewScalar, Derived>
|
const Cast<NewScalar, Derived>
|
||||||
MatrixBase<Scalar, Derived>::cast() const
|
MatrixBase<Scalar, Derived>::cast() const
|
||||||
{
|
{
|
||||||
return Cast<NewScalar, Derived>(static_cast<const Derived*>(this)->ref());
|
return Cast<NewScalar, Derived>(ref());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EIGEN_CAST_H
|
#endif // EIGEN_CAST_H
|
||||||
|
@ -60,9 +60,6 @@ template<typename MatrixType> class Column
|
|||||||
assert(col >= 0 && col < matrix.cols());
|
assert(col >= 0 && col < matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Column(const Column& other)
|
|
||||||
: m_matrix(other.m_matrix), m_col(other.m_col) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Column)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Column)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -89,8 +86,8 @@ template<typename MatrixType> class Column
|
|||||||
|
|
||||||
/** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
|
/** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
|
||||||
*
|
*
|
||||||
* Example: \include MatrixBase_column.cpp
|
* Example: \include MatrixBase_col.cpp
|
||||||
* Output: \verbinclude MatrixBase_column.out
|
* Output: \verbinclude MatrixBase_col.out
|
||||||
*
|
*
|
||||||
* \sa row(), class Column */
|
* \sa row(), class Column */
|
||||||
template<typename Scalar, typename Derived>
|
template<typename Scalar, typename Derived>
|
||||||
|
@ -48,9 +48,6 @@ template<typename MatrixType> class Conjugate : NoOperatorEquals,
|
|||||||
|
|
||||||
Conjugate(const MatRef& matrix) : m_matrix(matrix) {}
|
Conjugate(const MatRef& matrix) : m_matrix(matrix) {}
|
||||||
|
|
||||||
Conjugate(const Conjugate& other)
|
|
||||||
: m_matrix(other.m_matrix) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -75,7 +72,7 @@ template<typename Scalar, typename Derived>
|
|||||||
const Conjugate<Derived>
|
const Conjugate<Derived>
|
||||||
MatrixBase<Scalar, Derived>::conjugate() const
|
MatrixBase<Scalar, Derived>::conjugate() const
|
||||||
{
|
{
|
||||||
return Conjugate<Derived>(static_cast<const Derived*>(this)->ref());
|
return Conjugate<Derived>(ref());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the adjoint (i.e. conjugate transpose) of *this.
|
/** \returns an expression of the adjoint (i.e. conjugate transpose) of *this.
|
||||||
|
@ -48,8 +48,6 @@ template<typename MatrixType> class DiagonalCoeffs
|
|||||||
|
|
||||||
DiagonalCoeffs(const MatRef& matrix) : m_matrix(matrix) {}
|
DiagonalCoeffs(const MatRef& matrix) : m_matrix(matrix) {}
|
||||||
|
|
||||||
DiagonalCoeffs(const DiagonalCoeffs& other) : m_matrix(other.m_matrix) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DiagonalCoeffs)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DiagonalCoeffs)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -41,9 +41,6 @@ template<typename Lhs, typename Rhs> class Difference : NoOperatorEquals,
|
|||||||
assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Difference(const Difference& other)
|
|
||||||
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
||||||
|
@ -64,11 +64,6 @@ template<typename MatrixType> class DynBlock
|
|||||||
&& startCol >= 0 && blockCols >= 1 && startCol + blockCols <= matrix.cols());
|
&& startCol >= 0 && blockCols >= 1 && startCol + blockCols <= matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
DynBlock(const DynBlock& other)
|
|
||||||
: m_matrix(other.m_matrix),
|
|
||||||
m_startRow(other.m_startRow), m_startCol(other.m_startCol),
|
|
||||||
m_blockRows(other.m_blockRows), m_blockCols(other.m_blockCols) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DynBlock)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DynBlock)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,13 +33,6 @@ template<typename MatrixType> class Map
|
|||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
friend class MatrixBase<Scalar, Map<MatrixType> >;
|
friend class MatrixBase<Scalar, Map<MatrixType> >;
|
||||||
|
|
||||||
Map(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols)
|
|
||||||
{
|
|
||||||
assert(rows > 0 && cols > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -66,6 +59,17 @@ template<typename MatrixType> class Map
|
|||||||
return const_cast<Scalar*>(m_data)[col + row * m_cols];
|
return const_cast<Scalar*>(m_data)[col + row * m_cols];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
Map(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols)
|
||||||
|
{
|
||||||
|
assert(rows > 0
|
||||||
|
&& (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows)
|
||||||
|
&& cols > 0
|
||||||
|
&& (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols));
|
||||||
|
}
|
||||||
|
|
||||||
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Scalar* m_data;
|
const Scalar* m_data;
|
||||||
int m_rows, m_cols;
|
int m_rows, m_cols;
|
||||||
|
@ -34,7 +34,6 @@ template<typename MatrixType> class MatrixRef
|
|||||||
friend class MatrixBase<Scalar, MatrixRef>;
|
friend class MatrixBase<Scalar, MatrixRef>;
|
||||||
|
|
||||||
MatrixRef(const MatrixType& matrix) : m_matrix(matrix) {}
|
MatrixRef(const MatrixType& matrix) : m_matrix(matrix) {}
|
||||||
MatrixRef(const MatrixRef& other) : m_matrix(other.m_matrix) {}
|
|
||||||
~MatrixRef() {}
|
~MatrixRef() {}
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixRef)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixRef)
|
||||||
|
@ -54,9 +54,6 @@ template<typename MatrixType> class Minor
|
|||||||
&& col >= 0 && col < matrix.cols());
|
&& col >= 0 && col < matrix.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Minor(const Minor& other)
|
|
||||||
: m_matrix(other.m_matrix), m_row(other.m_row), m_col(other.m_col) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Minor)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Minor)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,11 +33,6 @@ template<typename MatrixType> class Ones : NoOperatorEquals,
|
|||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
friend class MatrixBase<Scalar, Ones<MatrixType> >;
|
friend class MatrixBase<Scalar, Ones<MatrixType> >;
|
||||||
|
|
||||||
Ones(int rows, int cols) : m_rows(rows), m_cols(cols)
|
|
||||||
{
|
|
||||||
assert(rows > 0 && cols > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -51,6 +46,15 @@ template<typename MatrixType> class Ones : NoOperatorEquals,
|
|||||||
return static_cast<Scalar>(1);
|
return static_cast<Scalar>(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
Ones(int rows, int cols) : m_rows(rows), m_cols(cols)
|
||||||
|
{
|
||||||
|
assert(rows > 0
|
||||||
|
&& (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows)
|
||||||
|
&& cols > 0
|
||||||
|
&& (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols));
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_rows, m_cols;
|
int m_rows, m_cols;
|
||||||
};
|
};
|
||||||
|
@ -36,9 +36,6 @@ template<typename MatrixType> class Opposite : NoOperatorEquals,
|
|||||||
|
|
||||||
Opposite(const MatRef& matrix) : m_matrix(matrix) {}
|
Opposite(const MatRef& matrix) : m_matrix(matrix) {}
|
||||||
|
|
||||||
Opposite(const Opposite& other)
|
|
||||||
: m_matrix(other.m_matrix) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -60,7 +57,7 @@ template<typename Scalar, typename Derived>
|
|||||||
const Opposite<Derived>
|
const Opposite<Derived>
|
||||||
MatrixBase<Scalar, Derived>::operator-() const
|
MatrixBase<Scalar, Derived>::operator-() const
|
||||||
{
|
{
|
||||||
return Opposite<Derived>(static_cast<const Derived*>(this)->ref());
|
return Opposite<Derived>(ref());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EIGEN_OPPOSITE_H
|
#endif // EIGEN_OPPOSITE_H
|
||||||
|
@ -75,9 +75,6 @@ template<typename Lhs, typename Rhs> class Product : NoOperatorEquals,
|
|||||||
assert(lhs.cols() == rhs.rows());
|
assert(lhs.cols() == rhs.rows());
|
||||||
}
|
}
|
||||||
|
|
||||||
Product(const Product& other)
|
|
||||||
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
||||||
|
@ -33,11 +33,6 @@ template<typename MatrixType> class Random : NoOperatorEquals,
|
|||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
friend class MatrixBase<Scalar, Random<MatrixType> >;
|
friend class MatrixBase<Scalar, Random<MatrixType> >;
|
||||||
|
|
||||||
Random(int rows, int cols) : m_rows(rows), m_cols(cols)
|
|
||||||
{
|
|
||||||
assert(rows > 0 && cols > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -51,6 +46,15 @@ template<typename MatrixType> class Random : NoOperatorEquals,
|
|||||||
return random<Scalar>();
|
return random<Scalar>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
Random(int rows, int cols) : m_rows(rows), m_cols(cols)
|
||||||
|
{
|
||||||
|
assert(rows > 0
|
||||||
|
&& (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows)
|
||||||
|
&& cols > 0
|
||||||
|
&& (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols));
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_rows, m_cols;
|
int m_rows, m_cols;
|
||||||
};
|
};
|
||||||
|
@ -60,9 +60,6 @@ template<typename MatrixType> class Row
|
|||||||
assert(row >= 0 && row < matrix.rows());
|
assert(row >= 0 && row < matrix.rows());
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(const Row& other)
|
|
||||||
: m_matrix(other.m_matrix), m_row(other.m_row) {}
|
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Row& operator=(const MatrixBase<Scalar, OtherDerived>& other)
|
Row& operator=(const MatrixBase<Scalar, OtherDerived>& other)
|
||||||
{
|
{
|
||||||
|
@ -37,9 +37,6 @@ template<typename FactorType, typename MatrixType> class ScalarMultiple : NoOper
|
|||||||
ScalarMultiple(const MatRef& matrix, FactorType factor)
|
ScalarMultiple(const MatRef& matrix, FactorType factor)
|
||||||
: m_matrix(matrix), m_factor(factor) {}
|
: m_matrix(matrix), m_factor(factor) {}
|
||||||
|
|
||||||
ScalarMultiple(const ScalarMultiple& other)
|
|
||||||
: m_matrix(other.m_matrix), m_factor(other.m_factor) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
|
@ -41,8 +41,6 @@ template<typename Lhs, typename Rhs> class Sum : NoOperatorEquals,
|
|||||||
assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
Sum(const Sum& other) : m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
_ColsAtCompileTime = Rhs::ColsAtCompileTime;
|
||||||
|
@ -48,9 +48,6 @@ template<typename MatrixType> class Transpose
|
|||||||
|
|
||||||
Transpose(const MatRef& matrix) : m_matrix(matrix) {}
|
Transpose(const MatRef& matrix) : m_matrix(matrix) {}
|
||||||
|
|
||||||
Transpose(const Transpose& other)
|
|
||||||
: m_matrix(other.m_matrix) {}
|
|
||||||
|
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,11 +33,6 @@ template<typename MatrixType> class Zero : NoOperatorEquals,
|
|||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
friend class MatrixBase<Scalar, Zero<MatrixType> >;
|
friend class MatrixBase<Scalar, Zero<MatrixType> >;
|
||||||
|
|
||||||
Zero(int rows, int cols) : m_rows(rows), m_cols(cols)
|
|
||||||
{
|
|
||||||
assert(rows > 0 && cols > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||||
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
|
||||||
@ -51,6 +46,15 @@ template<typename MatrixType> class Zero : NoOperatorEquals,
|
|||||||
return static_cast<Scalar>(0);
|
return static_cast<Scalar>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
Zero(int rows, int cols) : m_rows(rows), m_cols(cols)
|
||||||
|
{
|
||||||
|
assert(rows > 0
|
||||||
|
&& (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows)
|
||||||
|
&& cols > 0
|
||||||
|
&& (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols));
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_rows, m_cols;
|
int m_rows, m_cols;
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
o /** @mainpage Eigen
|
o /** @mainpage Eigen
|
||||||
|
|
||||||
<h3>If you see this page, then you have not properly generated the documentation.</h3>
|
<h3>If you see this page, then you have not properly generated the documentation. Namely, you have run doxygen from the source directory, which is not appropriate for generating the documentation of Eigen.</h3>
|
||||||
|
|
||||||
In order to generate the documentation for Eigen, follow these steps:
|
In order to generate the documentation of Eigen, please follow these steps:
|
||||||
<ul>
|
<ul>
|
||||||
<li>make sure you have the required software installed: cmake, doxygen, and a C++ compiler.
|
<li>make sure you have the required software installed: cmake, doxygen, and a C++ compiler.
|
||||||
<li>create a new directory, which we will call the "build directory", outside of the Eigen source directory.</li>
|
<li>create a new directory, which we will call the "build directory", outside of the Eigen source directory.</li>
|
||||||
<li>enter the build directory</li>
|
<li>enter the build directory</li>
|
||||||
<li>configure the project: <pre>cmake -DBUILD_DOC=ON /path/to/source/directory</pre></li>
|
<li>configure the project: <pre>cmake -DBUILD_DOC=ON /path/to/source/directory</pre></li>
|
||||||
<li>now generate the documentaion: <pre>make</pre> or, if you have two CPUs, <pre>make -j2</pre> Note that this will compile the examples, run them, and integrate their output into the documentation. This is why it can take some time.</li>
|
<li>now generate the documentaion: <pre>make</pre> or, if you have two CPUs, <pre>make -j2</pre> Note that this will compile the examples, run them, and integrate their output into the documentation, which can take some time.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
You will now find the HTML documentation in the doc/html/ subdirectory of the build directory.
|
After doing that, you will find the HTML documentation in the doc/html/ subdirectory of the build directory.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ int main(int argc, char *argv[])
|
|||||||
I(i,j) = (i==j);
|
I(i,j) = (i==j);
|
||||||
m(i,j) = (i+3*j);
|
m(i,j) = (i+3*j);
|
||||||
}
|
}
|
||||||
for(int a = 0; a < 100000000; a++)
|
for(int a = 0; a < 400000000; a++)
|
||||||
{
|
{
|
||||||
m = I + 0.00005 * (m + m*m);
|
m = I + 0.00005 * (m + m*m);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user