aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-30 04:52:20 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-30 04:52:20 -0500
commit26c2afd55a16b2868e6776797e33c11bd28f3ffc (patch)
tree483d2184afa001ecf45e9f6fa8414bb356e97d0b /doc
parentdbd9c5fd50cde5d5beaae44147eca3ba11934721 (diff)
fix compile errors in Tridiagonalization and in doc examples
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/class_FixedVectorBlock.cpp4
-rw-r--r--doc/examples/class_VectorBlock.cpp4
-rw-r--r--doc/snippets/Tridiagonalization_diagonal.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/examples/class_FixedVectorBlock.cpp b/doc/examples/class_FixedVectorBlock.cpp
index 9be7d8d71..c88c9fbf1 100644
--- a/doc/examples/class_FixedVectorBlock.cpp
+++ b/doc/examples/class_FixedVectorBlock.cpp
@@ -11,10 +11,10 @@ firstTwo(MatrixBase<Derived>& v)
}
template<typename Derived>
-const Eigen::VectorBlock<Derived, 2>
+const Eigen::VectorBlock<const Derived, 2>
firstTwo(const MatrixBase<Derived>& v)
{
- return Eigen::VectorBlock<Derived, 2>(v.derived(), 0);
+ return Eigen::VectorBlock<const Derived, 2>(v.derived(), 0);
}
int main(int, char**)
diff --git a/doc/examples/class_VectorBlock.cpp b/doc/examples/class_VectorBlock.cpp
index 2f02c8f69..dc213df20 100644
--- a/doc/examples/class_VectorBlock.cpp
+++ b/doc/examples/class_VectorBlock.cpp
@@ -11,10 +11,10 @@ segmentFromRange(MatrixBase<Derived>& v, int start, int end)
}
template<typename Derived>
-const Eigen::VectorBlock<Derived>
+const Eigen::VectorBlock<const Derived>
segmentFromRange(const MatrixBase<Derived>& v, int start, int end)
{
- return Eigen::VectorBlock<Derived>(v.derived(), start, end-start);
+ return Eigen::VectorBlock<const Derived>(v.derived(), start, end-start);
}
int main(int, char**)
diff --git a/doc/snippets/Tridiagonalization_diagonal.cpp b/doc/snippets/Tridiagonalization_diagonal.cpp
index a4a5a9c5a..6eec82169 100644
--- a/doc/snippets/Tridiagonalization_diagonal.cpp
+++ b/doc/snippets/Tridiagonalization_diagonal.cpp
@@ -4,7 +4,7 @@ cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl
Tridiagonalization<MatrixXcd> triOfA(A);
MatrixXd T = triOfA.matrixT();
-cout << "The tridiagonal matrix T is:" << endl << triOfA.matrixT() << endl << endl;
+cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
cout << "We can also extract the diagonals of T directly ..." << endl;
VectorXd diag = triOfA.diagonal();