diff options
Diffstat (limited to 'eigen/doc/snippets')
274 files changed, 0 insertions, 1588 deletions
diff --git a/eigen/doc/snippets/.krazy b/eigen/doc/snippets/.krazy deleted file mode 100644 index 00b9940..0000000 --- a/eigen/doc/snippets/.krazy +++ /dev/null @@ -1,2 +0,0 @@ -EXCLUDE copyright -EXCLUDE license diff --git a/eigen/doc/snippets/AngleAxis_mimic_euler.cpp b/eigen/doc/snippets/AngleAxis_mimic_euler.cpp deleted file mode 100644 index 456de7f..0000000 --- a/eigen/doc/snippets/AngleAxis_mimic_euler.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3f m; -m = AngleAxisf(0.25*M_PI, Vector3f::UnitX()) - * AngleAxisf(0.5*M_PI, Vector3f::UnitY()) - * AngleAxisf(0.33*M_PI, Vector3f::UnitZ()); -cout << m << endl << "is unitary: " << m.isUnitary() << endl; diff --git a/eigen/doc/snippets/BiCGSTAB_simple.cpp b/eigen/doc/snippets/BiCGSTAB_simple.cpp deleted file mode 100644 index 5520f4f..0000000 --- a/eigen/doc/snippets/BiCGSTAB_simple.cpp +++ /dev/null @@ -1,11 +0,0 @@ - int n = 10000; - VectorXd x(n), b(n); - SparseMatrix<double> A(n,n); - /* ... fill A and b ... */ - BiCGSTAB<SparseMatrix<double> > solver; - solver.compute(A); - x = solver.solve(b); - std::cout << "#iterations: " << solver.iterations() << std::endl; - std::cout << "estimated error: " << solver.error() << std::endl; - /* ... update b ... */ - x = solver.solve(b); // solve again
\ No newline at end of file diff --git a/eigen/doc/snippets/BiCGSTAB_step_by_step.cpp b/eigen/doc/snippets/BiCGSTAB_step_by_step.cpp deleted file mode 100644 index 06147bb..0000000 --- a/eigen/doc/snippets/BiCGSTAB_step_by_step.cpp +++ /dev/null @@ -1,14 +0,0 @@ - int n = 10000; - VectorXd x(n), b(n); - SparseMatrix<double> A(n,n); - /* ... fill A and b ... */ - BiCGSTAB<SparseMatrix<double> > solver(A); - // start from a random solution - x = VectorXd::Random(n); - solver.setMaxIterations(1); - int i = 0; - do { - x = solver.solveWithGuess(b,x); - std::cout << i << " : " << solver.error() << std::endl; - ++i; - } while (solver.info()!=Success && i<100);
\ No newline at end of file diff --git a/eigen/doc/snippets/CMakeLists.txt b/eigen/doc/snippets/CMakeLists.txt deleted file mode 100644 index 1baf32f..0000000 --- a/eigen/doc/snippets/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -file(GLOB snippets_SRCS "*.cpp") - -add_custom_target(all_snippets) - -foreach(snippet_src ${snippets_SRCS}) - get_filename_component(snippet ${snippet_src} NAME_WE) - set(compile_snippet_target compile_${snippet}) - set(compile_snippet_src ${compile_snippet_target}.cpp) - file(READ ${snippet_src} snippet_source_code) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/compile_snippet.cpp.in - ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}) - add_executable(${compile_snippet_target} - ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}) - if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO) - target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}) - endif() - add_custom_command( - TARGET ${compile_snippet_target} - POST_BUILD - COMMAND ${compile_snippet_target} - ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out - ) - add_dependencies(all_snippets ${compile_snippet_target}) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src} - PROPERTIES OBJECT_DEPENDS ${snippet_src}) -endforeach(snippet_src) diff --git a/eigen/doc/snippets/ColPivHouseholderQR_solve.cpp b/eigen/doc/snippets/ColPivHouseholderQR_solve.cpp deleted file mode 100644 index b7b204a..0000000 --- a/eigen/doc/snippets/ColPivHouseholderQR_solve.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix3f m = Matrix3f::Random(); -Matrix3f y = Matrix3f::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the matrix y:" << endl << y << endl; -Matrix3f x; -x = m.colPivHouseholderQr().solve(y); -assert(y.isApprox(m*x)); -cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; diff --git a/eigen/doc/snippets/ComplexEigenSolver_compute.cpp b/eigen/doc/snippets/ComplexEigenSolver_compute.cpp deleted file mode 100644 index 11d6bd3..0000000 --- a/eigen/doc/snippets/ComplexEigenSolver_compute.cpp +++ /dev/null @@ -1,16 +0,0 @@ -MatrixXcf A = MatrixXcf::Random(4,4); -cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; - -ComplexEigenSolver<MatrixXcf> ces; -ces.compute(A); -cout << "The eigenvalues of A are:" << endl << ces.eigenvalues() << endl; -cout << "The matrix of eigenvectors, V, is:" << endl << ces.eigenvectors() << endl << endl; - -complex<float> lambda = ces.eigenvalues()[0]; -cout << "Consider the first eigenvalue, lambda = " << lambda << endl; -VectorXcf v = ces.eigenvectors().col(0); -cout << "If v is the corresponding eigenvector, then lambda * v = " << endl << lambda * v << endl; -cout << "... and A * v = " << endl << A * v << endl << endl; - -cout << "Finally, V * D * V^(-1) = " << endl - << ces.eigenvectors() * ces.eigenvalues().asDiagonal() * ces.eigenvectors().inverse() << endl; diff --git a/eigen/doc/snippets/ComplexEigenSolver_eigenvalues.cpp b/eigen/doc/snippets/ComplexEigenSolver_eigenvalues.cpp deleted file mode 100644 index 5509bd8..0000000 --- a/eigen/doc/snippets/ComplexEigenSolver_eigenvalues.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXcf ones = MatrixXcf::Ones(3,3); -ComplexEigenSolver<MatrixXcf> ces(ones, /* computeEigenvectors = */ false); -cout << "The eigenvalues of the 3x3 matrix of ones are:" - << endl << ces.eigenvalues() << endl; diff --git a/eigen/doc/snippets/ComplexEigenSolver_eigenvectors.cpp b/eigen/doc/snippets/ComplexEigenSolver_eigenvectors.cpp deleted file mode 100644 index bb1c2cc..0000000 --- a/eigen/doc/snippets/ComplexEigenSolver_eigenvectors.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXcf ones = MatrixXcf::Ones(3,3); -ComplexEigenSolver<MatrixXcf> ces(ones); -cout << "The first eigenvector of the 3x3 matrix of ones is:" - << endl << ces.eigenvectors().col(1) << endl; diff --git a/eigen/doc/snippets/ComplexSchur_compute.cpp b/eigen/doc/snippets/ComplexSchur_compute.cpp deleted file mode 100644 index 3a51701..0000000 --- a/eigen/doc/snippets/ComplexSchur_compute.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXcf A = MatrixXcf::Random(4,4); -ComplexSchur<MatrixXcf> schur(4); -schur.compute(A); -cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl; -schur.compute(A.inverse()); -cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl; diff --git a/eigen/doc/snippets/ComplexSchur_matrixT.cpp b/eigen/doc/snippets/ComplexSchur_matrixT.cpp deleted file mode 100644 index 8380571..0000000 --- a/eigen/doc/snippets/ComplexSchur_matrixT.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXcf A = MatrixXcf::Random(4,4); -cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; -ComplexSchur<MatrixXcf> schurOfA(A, false); // false means do not compute U -cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl; diff --git a/eigen/doc/snippets/ComplexSchur_matrixU.cpp b/eigen/doc/snippets/ComplexSchur_matrixU.cpp deleted file mode 100644 index ba3d9c2..0000000 --- a/eigen/doc/snippets/ComplexSchur_matrixU.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXcf A = MatrixXcf::Random(4,4); -cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; -ComplexSchur<MatrixXcf> schurOfA(A); -cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl; diff --git a/eigen/doc/snippets/Cwise_abs.cpp b/eigen/doc/snippets/Cwise_abs.cpp deleted file mode 100644 index 0aeec3a..0000000 --- a/eigen/doc/snippets/Cwise_abs.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,-2,-3); -cout << v.abs() << endl; diff --git a/eigen/doc/snippets/Cwise_abs2.cpp b/eigen/doc/snippets/Cwise_abs2.cpp deleted file mode 100644 index 2c4f9b3..0000000 --- a/eigen/doc/snippets/Cwise_abs2.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,-2,-3); -cout << v.abs2() << endl; diff --git a/eigen/doc/snippets/Cwise_acos.cpp b/eigen/doc/snippets/Cwise_acos.cpp deleted file mode 100644 index 34432cb..0000000 --- a/eigen/doc/snippets/Cwise_acos.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(0, sqrt(2.)/2, 1); -cout << v.acos() << endl; diff --git a/eigen/doc/snippets/Cwise_arg.cpp b/eigen/doc/snippets/Cwise_arg.cpp deleted file mode 100644 index 3f45133..0000000 --- a/eigen/doc/snippets/Cwise_arg.cpp +++ /dev/null @@ -1,3 +0,0 @@ -ArrayXcf v = ArrayXcf::Random(3); -cout << v << endl << endl; -cout << arg(v) << endl; diff --git a/eigen/doc/snippets/Cwise_array_power_array.cpp b/eigen/doc/snippets/Cwise_array_power_array.cpp deleted file mode 100644 index 432a76e..0000000 --- a/eigen/doc/snippets/Cwise_array_power_array.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Array<double,1,3> x(8,25,3), - e(1./3.,0.5,2.); -cout << "[" << x << "]^[" << e << "] = " << x.pow(e) << endl; // using ArrayBase::pow -cout << "[" << x << "]^[" << e << "] = " << pow(x,e) << endl; // using Eigen::pow diff --git a/eigen/doc/snippets/Cwise_asin.cpp b/eigen/doc/snippets/Cwise_asin.cpp deleted file mode 100644 index 8dad838..0000000 --- a/eigen/doc/snippets/Cwise_asin.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(0, sqrt(2.)/2, 1); -cout << v.asin() << endl; diff --git a/eigen/doc/snippets/Cwise_atan.cpp b/eigen/doc/snippets/Cwise_atan.cpp deleted file mode 100644 index 4468447..0000000 --- a/eigen/doc/snippets/Cwise_atan.cpp +++ /dev/null @@ -1,2 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(5,0,1); -cout << v.atan() << endl; diff --git a/eigen/doc/snippets/Cwise_boolean_and.cpp b/eigen/doc/snippets/Cwise_boolean_and.cpp deleted file mode 100644 index df6b60d..0000000 --- a/eigen/doc/snippets/Cwise_boolean_and.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(-1,2,1), w(-3,2,3); -cout << ((v<w) && (v<0)) << endl; diff --git a/eigen/doc/snippets/Cwise_boolean_not.cpp b/eigen/doc/snippets/Cwise_boolean_not.cpp deleted file mode 100644 index 40009f1..0000000 --- a/eigen/doc/snippets/Cwise_boolean_not.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Array3d v(1,2,3); -v(1) *= 0.0/0.0; -v(2) /= 0.0; -cout << v << endl << endl; -cout << !isfinite(v) << endl; diff --git a/eigen/doc/snippets/Cwise_boolean_or.cpp b/eigen/doc/snippets/Cwise_boolean_or.cpp deleted file mode 100644 index 83eb006..0000000 --- a/eigen/doc/snippets/Cwise_boolean_or.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(-1,2,1), w(-3,2,3); -cout << ((v<w) || (v<0)) << endl; diff --git a/eigen/doc/snippets/Cwise_boolean_xor.cpp b/eigen/doc/snippets/Cwise_boolean_xor.cpp deleted file mode 100644 index fafbec8..0000000 --- a/eigen/doc/snippets/Cwise_boolean_xor.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(-1,2,1), w(-3,2,3); -cout << ((v<w) ^ (v<0)) << endl; diff --git a/eigen/doc/snippets/Cwise_ceil.cpp b/eigen/doc/snippets/Cwise_ceil.cpp deleted file mode 100644 index 76cf661..0000000 --- a/eigen/doc/snippets/Cwise_ceil.cpp +++ /dev/null @@ -1,3 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(7,-2,2); -cout << v << endl << endl; -cout << ceil(v) << endl; diff --git a/eigen/doc/snippets/Cwise_cos.cpp b/eigen/doc/snippets/Cwise_cos.cpp deleted file mode 100644 index f589f07..0000000 --- a/eigen/doc/snippets/Cwise_cos.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(M_PI, M_PI/2, M_PI/3); -cout << v.cos() << endl; diff --git a/eigen/doc/snippets/Cwise_cosh.cpp b/eigen/doc/snippets/Cwise_cosh.cpp deleted file mode 100644 index 80ee75d..0000000 --- a/eigen/doc/snippets/Cwise_cosh.cpp +++ /dev/null @@ -1,2 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(5,0,1); -cout << cosh(v) << endl; diff --git a/eigen/doc/snippets/Cwise_cube.cpp b/eigen/doc/snippets/Cwise_cube.cpp deleted file mode 100644 index 85e41dc..0000000 --- a/eigen/doc/snippets/Cwise_cube.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4); -cout << v.cube() << endl; diff --git a/eigen/doc/snippets/Cwise_equal_equal.cpp b/eigen/doc/snippets/Cwise_equal_equal.cpp deleted file mode 100644 index 0ba96f6..0000000 --- a/eigen/doc/snippets/Cwise_equal_equal.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v==w) << endl; diff --git a/eigen/doc/snippets/Cwise_exp.cpp b/eigen/doc/snippets/Cwise_exp.cpp deleted file mode 100644 index db23618..0000000 --- a/eigen/doc/snippets/Cwise_exp.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3); -cout << v.exp() << endl; diff --git a/eigen/doc/snippets/Cwise_floor.cpp b/eigen/doc/snippets/Cwise_floor.cpp deleted file mode 100644 index 73756b4..0000000 --- a/eigen/doc/snippets/Cwise_floor.cpp +++ /dev/null @@ -1,3 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(7,-2,2); -cout << v << endl << endl; -cout << floor(v) << endl; diff --git a/eigen/doc/snippets/Cwise_greater.cpp b/eigen/doc/snippets/Cwise_greater.cpp deleted file mode 100644 index 40ad029..0000000 --- a/eigen/doc/snippets/Cwise_greater.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v>w) << endl; diff --git a/eigen/doc/snippets/Cwise_greater_equal.cpp b/eigen/doc/snippets/Cwise_greater_equal.cpp deleted file mode 100644 index 6a08f89..0000000 --- a/eigen/doc/snippets/Cwise_greater_equal.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v>=w) << endl; diff --git a/eigen/doc/snippets/Cwise_inverse.cpp b/eigen/doc/snippets/Cwise_inverse.cpp deleted file mode 100644 index 3967a7e..0000000 --- a/eigen/doc/snippets/Cwise_inverse.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4); -cout << v.inverse() << endl; diff --git a/eigen/doc/snippets/Cwise_isFinite.cpp b/eigen/doc/snippets/Cwise_isFinite.cpp deleted file mode 100644 index 1da55fd..0000000 --- a/eigen/doc/snippets/Cwise_isFinite.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Array3d v(1,2,3); -v(1) *= 0.0/0.0; -v(2) /= 0.0; -cout << v << endl << endl; -cout << isfinite(v) << endl; diff --git a/eigen/doc/snippets/Cwise_isInf.cpp b/eigen/doc/snippets/Cwise_isInf.cpp deleted file mode 100644 index be79308..0000000 --- a/eigen/doc/snippets/Cwise_isInf.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Array3d v(1,2,3); -v(1) *= 0.0/0.0; -v(2) /= 0.0; -cout << v << endl << endl; -cout << isinf(v) << endl; diff --git a/eigen/doc/snippets/Cwise_isNaN.cpp b/eigen/doc/snippets/Cwise_isNaN.cpp deleted file mode 100644 index 7b2a930..0000000 --- a/eigen/doc/snippets/Cwise_isNaN.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Array3d v(1,2,3); -v(1) *= 0.0/0.0; -v(2) /= 0.0; -cout << v << endl << endl; -cout << isnan(v) << endl; diff --git a/eigen/doc/snippets/Cwise_less.cpp b/eigen/doc/snippets/Cwise_less.cpp deleted file mode 100644 index cafd3b6..0000000 --- a/eigen/doc/snippets/Cwise_less.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v<w) << endl; diff --git a/eigen/doc/snippets/Cwise_less_equal.cpp b/eigen/doc/snippets/Cwise_less_equal.cpp deleted file mode 100644 index 1600e39..0000000 --- a/eigen/doc/snippets/Cwise_less_equal.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v<=w) << endl; diff --git a/eigen/doc/snippets/Cwise_log.cpp b/eigen/doc/snippets/Cwise_log.cpp deleted file mode 100644 index f7aca72..0000000 --- a/eigen/doc/snippets/Cwise_log.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3); -cout << v.log() << endl; diff --git a/eigen/doc/snippets/Cwise_log10.cpp b/eigen/doc/snippets/Cwise_log10.cpp deleted file mode 100644 index b7ae4a8..0000000 --- a/eigen/doc/snippets/Cwise_log10.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array4d v(-1,0,1,2); -cout << log10(v) << endl; diff --git a/eigen/doc/snippets/Cwise_max.cpp b/eigen/doc/snippets/Cwise_max.cpp deleted file mode 100644 index 6602881..0000000 --- a/eigen/doc/snippets/Cwise_max.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4), w(4,2,3); -cout << v.max(w) << endl; diff --git a/eigen/doc/snippets/Cwise_min.cpp b/eigen/doc/snippets/Cwise_min.cpp deleted file mode 100644 index 1c01c76..0000000 --- a/eigen/doc/snippets/Cwise_min.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4), w(4,2,3); -cout << v.min(w) << endl; diff --git a/eigen/doc/snippets/Cwise_minus.cpp b/eigen/doc/snippets/Cwise_minus.cpp deleted file mode 100644 index b89b9fb..0000000 --- a/eigen/doc/snippets/Cwise_minus.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3); -cout << v-5 << endl; diff --git a/eigen/doc/snippets/Cwise_minus_equal.cpp b/eigen/doc/snippets/Cwise_minus_equal.cpp deleted file mode 100644 index dfde49d..0000000 --- a/eigen/doc/snippets/Cwise_minus_equal.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Array3d v(1,2,3); -v -= 5; -cout << v << endl; diff --git a/eigen/doc/snippets/Cwise_not_equal.cpp b/eigen/doc/snippets/Cwise_not_equal.cpp deleted file mode 100644 index 57a407a..0000000 --- a/eigen/doc/snippets/Cwise_not_equal.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3), w(3,2,1); -cout << (v!=w) << endl; diff --git a/eigen/doc/snippets/Cwise_plus.cpp b/eigen/doc/snippets/Cwise_plus.cpp deleted file mode 100644 index 9d47327..0000000 --- a/eigen/doc/snippets/Cwise_plus.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,3); -cout << v+5 << endl; diff --git a/eigen/doc/snippets/Cwise_plus_equal.cpp b/eigen/doc/snippets/Cwise_plus_equal.cpp deleted file mode 100644 index d744b1e..0000000 --- a/eigen/doc/snippets/Cwise_plus_equal.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Array3d v(1,2,3); -v += 5; -cout << v << endl; diff --git a/eigen/doc/snippets/Cwise_pow.cpp b/eigen/doc/snippets/Cwise_pow.cpp deleted file mode 100644 index a723ed8..0000000 --- a/eigen/doc/snippets/Cwise_pow.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(8,27,64); -cout << v.pow(0.333333) << endl; diff --git a/eigen/doc/snippets/Cwise_product.cpp b/eigen/doc/snippets/Cwise_product.cpp deleted file mode 100644 index 714d66d..0000000 --- a/eigen/doc/snippets/Cwise_product.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Array33i a = Array33i::Random(), b = Array33i::Random(); -Array33i c = a * b; -cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl; - diff --git a/eigen/doc/snippets/Cwise_quotient.cpp b/eigen/doc/snippets/Cwise_quotient.cpp deleted file mode 100644 index 7cb9f7f..0000000 --- a/eigen/doc/snippets/Cwise_quotient.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4), w(4,2,3); -cout << v/w << endl; diff --git a/eigen/doc/snippets/Cwise_round.cpp b/eigen/doc/snippets/Cwise_round.cpp deleted file mode 100644 index e5c8823..0000000 --- a/eigen/doc/snippets/Cwise_round.cpp +++ /dev/null @@ -1,3 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(7,-2,2); -cout << v << endl << endl; -cout << round(v) << endl; diff --git a/eigen/doc/snippets/Cwise_scalar_power_array.cpp b/eigen/doc/snippets/Cwise_scalar_power_array.cpp deleted file mode 100644 index c968b2c..0000000 --- a/eigen/doc/snippets/Cwise_scalar_power_array.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array<double,1,3> e(2,-3,1./3.); -cout << "10^[" << e << "] = " << pow(10,e) << endl; diff --git a/eigen/doc/snippets/Cwise_sign.cpp b/eigen/doc/snippets/Cwise_sign.cpp deleted file mode 100644 index 49920e4..0000000 --- a/eigen/doc/snippets/Cwise_sign.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(-3,5,0); -cout << v.sign() << endl; diff --git a/eigen/doc/snippets/Cwise_sin.cpp b/eigen/doc/snippets/Cwise_sin.cpp deleted file mode 100644 index 46fa908..0000000 --- a/eigen/doc/snippets/Cwise_sin.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(M_PI, M_PI/2, M_PI/3); -cout << v.sin() << endl; diff --git a/eigen/doc/snippets/Cwise_sinh.cpp b/eigen/doc/snippets/Cwise_sinh.cpp deleted file mode 100644 index fac9b19..0000000 --- a/eigen/doc/snippets/Cwise_sinh.cpp +++ /dev/null @@ -1,2 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(5,0,1); -cout << sinh(v) << endl; diff --git a/eigen/doc/snippets/Cwise_slash_equal.cpp b/eigen/doc/snippets/Cwise_slash_equal.cpp deleted file mode 100644 index 2efd32d..0000000 --- a/eigen/doc/snippets/Cwise_slash_equal.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Array3d v(3,2,4), w(5,4,2); -v /= w; -cout << v << endl; diff --git a/eigen/doc/snippets/Cwise_sqrt.cpp b/eigen/doc/snippets/Cwise_sqrt.cpp deleted file mode 100644 index 97bafe8..0000000 --- a/eigen/doc/snippets/Cwise_sqrt.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(1,2,4); -cout << v.sqrt() << endl; diff --git a/eigen/doc/snippets/Cwise_square.cpp b/eigen/doc/snippets/Cwise_square.cpp deleted file mode 100644 index f704c5e..0000000 --- a/eigen/doc/snippets/Cwise_square.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(2,3,4); -cout << v.square() << endl; diff --git a/eigen/doc/snippets/Cwise_tan.cpp b/eigen/doc/snippets/Cwise_tan.cpp deleted file mode 100644 index b758ef0..0000000 --- a/eigen/doc/snippets/Cwise_tan.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Array3d v(M_PI, M_PI/2, M_PI/3); -cout << v.tan() << endl; diff --git a/eigen/doc/snippets/Cwise_tanh.cpp b/eigen/doc/snippets/Cwise_tanh.cpp deleted file mode 100644 index 30cd045..0000000 --- a/eigen/doc/snippets/Cwise_tanh.cpp +++ /dev/null @@ -1,2 +0,0 @@ -ArrayXd v = ArrayXd::LinSpaced(5,0,1); -cout << tanh(v) << endl; diff --git a/eigen/doc/snippets/Cwise_times_equal.cpp b/eigen/doc/snippets/Cwise_times_equal.cpp deleted file mode 100644 index 147556c..0000000 --- a/eigen/doc/snippets/Cwise_times_equal.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Array3d v(1,2,3), w(2,3,0); -v *= w; -cout << v << endl; diff --git a/eigen/doc/snippets/DenseBase_LinSpaced.cpp b/eigen/doc/snippets/DenseBase_LinSpaced.cpp deleted file mode 100644 index 8e54b17..0000000 --- a/eigen/doc/snippets/DenseBase_LinSpaced.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << VectorXi::LinSpaced(4,7,10).transpose() << endl; -cout << VectorXd::LinSpaced(5,0.0,1.0).transpose() << endl; diff --git a/eigen/doc/snippets/DenseBase_LinSpacedInt.cpp b/eigen/doc/snippets/DenseBase_LinSpacedInt.cpp deleted file mode 100644 index 0d7ae06..0000000 --- a/eigen/doc/snippets/DenseBase_LinSpacedInt.cpp +++ /dev/null @@ -1,8 +0,0 @@ -cout << "Even spacing inputs:" << endl; -cout << VectorXi::LinSpaced(8,1,4).transpose() << endl; -cout << VectorXi::LinSpaced(8,1,8).transpose() << endl; -cout << VectorXi::LinSpaced(8,1,15).transpose() << endl; -cout << "Uneven spacing inputs:" << endl; -cout << VectorXi::LinSpaced(8,1,7).transpose() << endl; -cout << VectorXi::LinSpaced(8,1,9).transpose() << endl; -cout << VectorXi::LinSpaced(8,1,16).transpose() << endl; diff --git a/eigen/doc/snippets/DenseBase_LinSpaced_seq.cpp b/eigen/doc/snippets/DenseBase_LinSpaced_seq.cpp deleted file mode 100644 index f55c508..0000000 --- a/eigen/doc/snippets/DenseBase_LinSpaced_seq.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << VectorXi::LinSpaced(Sequential,4,7,10).transpose() << endl; -cout << VectorXd::LinSpaced(Sequential,5,0.0,1.0).transpose() << endl; diff --git a/eigen/doc/snippets/DenseBase_setLinSpaced.cpp b/eigen/doc/snippets/DenseBase_setLinSpaced.cpp deleted file mode 100644 index 46054f2..0000000 --- a/eigen/doc/snippets/DenseBase_setLinSpaced.cpp +++ /dev/null @@ -1,3 +0,0 @@ -VectorXf v; -v.setLinSpaced(5,0.5f,1.5f); -cout << v << endl; diff --git a/eigen/doc/snippets/DirectionWise_hnormalized.cpp b/eigen/doc/snippets/DirectionWise_hnormalized.cpp deleted file mode 100644 index 3410790..0000000 --- a/eigen/doc/snippets/DirectionWise_hnormalized.cpp +++ /dev/null @@ -1,7 +0,0 @@ -typedef Matrix<double,4,Dynamic> Matrix4Xd; -Matrix4Xd M = Matrix4Xd::Random(4,5); -Projective3d P(Matrix4d::Random()); -cout << "The matrix M is:" << endl << M << endl << endl; -cout << "M.colwise().hnormalized():" << endl << M.colwise().hnormalized() << endl << endl; -cout << "P*M:" << endl << P*M << endl << endl; -cout << "(P*M).colwise().hnormalized():" << endl << (P*M).colwise().hnormalized() << endl << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/DirectionWise_replicate.cpp b/eigen/doc/snippets/DirectionWise_replicate.cpp deleted file mode 100644 index d92d4a3..0000000 --- a/eigen/doc/snippets/DirectionWise_replicate.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXi m = MatrixXi::Random(2,3); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "m.colwise().replicate<3>() = ..." << endl; -cout << m.colwise().replicate<3>() << endl; diff --git a/eigen/doc/snippets/DirectionWise_replicate_int.cpp b/eigen/doc/snippets/DirectionWise_replicate_int.cpp deleted file mode 100644 index f9b1b53..0000000 --- a/eigen/doc/snippets/DirectionWise_replicate_int.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Vector3i v = Vector3i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "v.rowwise().replicate(5) = ..." << endl; -cout << v.rowwise().replicate(5) << endl; diff --git a/eigen/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp b/eigen/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp deleted file mode 100644 index c1d9fa8..0000000 --- a/eigen/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp +++ /dev/null @@ -1,16 +0,0 @@ -MatrixXd A = MatrixXd::Random(6,6); -cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; - -EigenSolver<MatrixXd> es(A); -cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; -cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl; - -complex<double> lambda = es.eigenvalues()[0]; -cout << "Consider the first eigenvalue, lambda = " << lambda << endl; -VectorXcd v = es.eigenvectors().col(0); -cout << "If v is the corresponding eigenvector, then lambda * v = " << endl << lambda * v << endl; -cout << "... and A * v = " << endl << A.cast<complex<double> >() * v << endl << endl; - -MatrixXcd D = es.eigenvalues().asDiagonal(); -MatrixXcd V = es.eigenvectors(); -cout << "Finally, V * D * V^(-1) = " << endl << V * D * V.inverse() << endl; diff --git a/eigen/doc/snippets/EigenSolver_compute.cpp b/eigen/doc/snippets/EigenSolver_compute.cpp deleted file mode 100644 index a5c96e9..0000000 --- a/eigen/doc/snippets/EigenSolver_compute.cpp +++ /dev/null @@ -1,6 +0,0 @@ -EigenSolver<MatrixXf> es; -MatrixXf A = MatrixXf::Random(4,4); -es.compute(A, /* computeEigenvectors = */ false); -cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I -cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/eigen/doc/snippets/EigenSolver_eigenvalues.cpp b/eigen/doc/snippets/EigenSolver_eigenvalues.cpp deleted file mode 100644 index ed28869..0000000 --- a/eigen/doc/snippets/EigenSolver_eigenvalues.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -EigenSolver<MatrixXd> es(ones, false); -cout << "The eigenvalues of the 3x3 matrix of ones are:" - << endl << es.eigenvalues() << endl; diff --git a/eigen/doc/snippets/EigenSolver_eigenvectors.cpp b/eigen/doc/snippets/EigenSolver_eigenvectors.cpp deleted file mode 100644 index 8355f76..0000000 --- a/eigen/doc/snippets/EigenSolver_eigenvectors.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -EigenSolver<MatrixXd> es(ones); -cout << "The first eigenvector of the 3x3 matrix of ones is:" - << endl << es.eigenvectors().col(0) << endl; diff --git a/eigen/doc/snippets/EigenSolver_pseudoEigenvectors.cpp b/eigen/doc/snippets/EigenSolver_pseudoEigenvectors.cpp deleted file mode 100644 index 85e2569..0000000 --- a/eigen/doc/snippets/EigenSolver_pseudoEigenvectors.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXd A = MatrixXd::Random(6,6); -cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; - -EigenSolver<MatrixXd> es(A); -MatrixXd D = es.pseudoEigenvalueMatrix(); -MatrixXd V = es.pseudoEigenvectors(); -cout << "The pseudo-eigenvalue matrix D is:" << endl << D << endl; -cout << "The pseudo-eigenvector matrix V is:" << endl << V << endl; -cout << "Finally, V * D * V^(-1) = " << endl << V * D * V.inverse() << endl; diff --git a/eigen/doc/snippets/FullPivHouseholderQR_solve.cpp b/eigen/doc/snippets/FullPivHouseholderQR_solve.cpp deleted file mode 100644 index 23bc074..0000000 --- a/eigen/doc/snippets/FullPivHouseholderQR_solve.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix3f m = Matrix3f::Random(); -Matrix3f y = Matrix3f::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the matrix y:" << endl << y << endl; -Matrix3f x; -x = m.fullPivHouseholderQr().solve(y); -assert(y.isApprox(m*x)); -cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; diff --git a/eigen/doc/snippets/FullPivLU_image.cpp b/eigen/doc/snippets/FullPivLU_image.cpp deleted file mode 100644 index 817bc1e..0000000 --- a/eigen/doc/snippets/FullPivLU_image.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Matrix3d m; -m << 1,1,0, - 1,3,2, - 0,1,1; -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Notice that the middle column is the sum of the two others, so the " - << "columns are linearly dependent." << endl; -cout << "Here is a matrix whose columns have the same span but are linearly independent:" - << endl << m.fullPivLu().image(m) << endl; diff --git a/eigen/doc/snippets/FullPivLU_kernel.cpp b/eigen/doc/snippets/FullPivLU_kernel.cpp deleted file mode 100644 index 7086e01..0000000 --- a/eigen/doc/snippets/FullPivLU_kernel.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXf m = MatrixXf::Random(3,5); -cout << "Here is the matrix m:" << endl << m << endl; -MatrixXf ker = m.fullPivLu().kernel(); -cout << "Here is a matrix whose columns form a basis of the kernel of m:" - << endl << ker << endl; -cout << "By definition of the kernel, m*ker is zero:" - << endl << m*ker << endl; diff --git a/eigen/doc/snippets/FullPivLU_solve.cpp b/eigen/doc/snippets/FullPivLU_solve.cpp deleted file mode 100644 index c1f8823..0000000 --- a/eigen/doc/snippets/FullPivLU_solve.cpp +++ /dev/null @@ -1,11 +0,0 @@ -Matrix<float,2,3> m = Matrix<float,2,3>::Random(); -Matrix2f y = Matrix2f::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the matrix y:" << endl << y << endl; -Matrix<float,3,2> x = m.fullPivLu().solve(y); -if((m*x).isApprox(y)) -{ - cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; -} -else - cout << "The equation mx=y does not have any solution." << endl; diff --git a/eigen/doc/snippets/GeneralizedEigenSolver.cpp b/eigen/doc/snippets/GeneralizedEigenSolver.cpp deleted file mode 100644 index 2acda45..0000000 --- a/eigen/doc/snippets/GeneralizedEigenSolver.cpp +++ /dev/null @@ -1,7 +0,0 @@ -GeneralizedEigenSolver<MatrixXf> ges; -MatrixXf A = MatrixXf::Random(4,4); -MatrixXf B = MatrixXf::Random(4,4); -ges.compute(A, B); -cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl; -cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl; -cout << "The (complex) generalzied eigenvalues are (alphas./beta): " << ges.eigenvalues().transpose() << endl; diff --git a/eigen/doc/snippets/HessenbergDecomposition_compute.cpp b/eigen/doc/snippets/HessenbergDecomposition_compute.cpp deleted file mode 100644 index 50e3783..0000000 --- a/eigen/doc/snippets/HessenbergDecomposition_compute.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXcf A = MatrixXcf::Random(4,4); -HessenbergDecomposition<MatrixXcf> hd(4); -hd.compute(A); -cout << "The matrix H in the decomposition of A is:" << endl << hd.matrixH() << endl; -hd.compute(2*A); // re-use hd to compute and store decomposition of 2A -cout << "The matrix H in the decomposition of 2A is:" << endl << hd.matrixH() << endl; diff --git a/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp b/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp deleted file mode 100644 index af01366..0000000 --- a/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix4f A = MatrixXf::Random(4,4); -cout << "Here is a random 4x4 matrix:" << endl << A << endl; -HessenbergDecomposition<MatrixXf> hessOfA(A); -MatrixXf H = hessOfA.matrixH(); -cout << "The Hessenberg matrix H is:" << endl << H << endl; -MatrixXf Q = hessOfA.matrixQ(); -cout << "The orthogonal matrix Q is:" << endl << Q << endl; -cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl; diff --git a/eigen/doc/snippets/HessenbergDecomposition_packedMatrix.cpp b/eigen/doc/snippets/HessenbergDecomposition_packedMatrix.cpp deleted file mode 100644 index 4fa5957..0000000 --- a/eigen/doc/snippets/HessenbergDecomposition_packedMatrix.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Matrix4d A = Matrix4d::Random(4,4); -cout << "Here is a random 4x4 matrix:" << endl << A << endl; -HessenbergDecomposition<Matrix4d> hessOfA(A); -Matrix4d pm = hessOfA.packedMatrix(); -cout << "The packed matrix M is:" << endl << pm << endl; -cout << "The upper Hessenberg part corresponds to the matrix H, which is:" - << endl << hessOfA.matrixH() << endl; -Vector3d hc = hessOfA.householderCoefficients(); -cout << "The vector of Householder coefficients is:" << endl << hc << endl; diff --git a/eigen/doc/snippets/HouseholderQR_householderQ.cpp b/eigen/doc/snippets/HouseholderQR_householderQ.cpp deleted file mode 100644 index e859ce5..0000000 --- a/eigen/doc/snippets/HouseholderQR_householderQ.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXf A(MatrixXf::Random(5,3)), thinQ(MatrixXf::Identity(5,3)), Q; -A.setRandom(); -HouseholderQR<MatrixXf> qr(A); -Q = qr.householderQ(); -thinQ = qr.householderQ() * thinQ; -std::cout << "The complete unitary matrix Q is:\n" << Q << "\n\n"; -std::cout << "The thin matrix Q is:\n" << thinQ << "\n\n"; diff --git a/eigen/doc/snippets/HouseholderQR_solve.cpp b/eigen/doc/snippets/HouseholderQR_solve.cpp deleted file mode 100644 index 8cce6ce..0000000 --- a/eigen/doc/snippets/HouseholderQR_solve.cpp +++ /dev/null @@ -1,9 +0,0 @@ -typedef Matrix<float,3,3> Matrix3x3; -Matrix3x3 m = Matrix3x3::Random(); -Matrix3f y = Matrix3f::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the matrix y:" << endl << y << endl; -Matrix3f x; -x = m.householderQr().solve(y); -assert(y.isApprox(m*x)); -cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; diff --git a/eigen/doc/snippets/HouseholderSequence_HouseholderSequence.cpp b/eigen/doc/snippets/HouseholderSequence_HouseholderSequence.cpp deleted file mode 100644 index 2632b83..0000000 --- a/eigen/doc/snippets/HouseholderSequence_HouseholderSequence.cpp +++ /dev/null @@ -1,31 +0,0 @@ -Matrix3d v = Matrix3d::Random(); -cout << "The matrix v is:" << endl; -cout << v << endl; - -Vector3d v0(1, v(1,0), v(2,0)); -cout << "The first Householder vector is: v_0 = " << v0.transpose() << endl; -Vector3d v1(0, 1, v(2,1)); -cout << "The second Householder vector is: v_1 = " << v1.transpose() << endl; -Vector3d v2(0, 0, 1); -cout << "The third Householder vector is: v_2 = " << v2.transpose() << endl; - -Vector3d h = Vector3d::Random(); -cout << "The Householder coefficients are: h = " << h.transpose() << endl; - -Matrix3d H0 = Matrix3d::Identity() - h(0) * v0 * v0.adjoint(); -cout << "The first Householder reflection is represented by H_0 = " << endl; -cout << H0 << endl; -Matrix3d H1 = Matrix3d::Identity() - h(1) * v1 * v1.adjoint(); -cout << "The second Householder reflection is represented by H_1 = " << endl; -cout << H1 << endl; -Matrix3d H2 = Matrix3d::Identity() - h(2) * v2 * v2.adjoint(); -cout << "The third Householder reflection is represented by H_2 = " << endl; -cout << H2 << endl; -cout << "Their product is H_0 H_1 H_2 = " << endl; -cout << H0 * H1 * H2 << endl; - -HouseholderSequence<Matrix3d, Vector3d> hhSeq(v, h); -Matrix3d hhSeqAsMatrix(hhSeq); -cout << "If we construct a HouseholderSequence from v and h" << endl; -cout << "and convert it to a matrix, we get:" << endl; -cout << hhSeqAsMatrix << endl; diff --git a/eigen/doc/snippets/IOFormat.cpp b/eigen/doc/snippets/IOFormat.cpp deleted file mode 100644 index 735f5dd..0000000 --- a/eigen/doc/snippets/IOFormat.cpp +++ /dev/null @@ -1,14 +0,0 @@ -std::string sep = "\n----------------------------------------\n"; -Matrix3d m1; -m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9; - -IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";"); -IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]"); -IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]"); -IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]"); - -std::cout << m1 << sep; -std::cout << m1.format(CommaInitFmt) << sep; -std::cout << m1.format(CleanFmt) << sep; -std::cout << m1.format(OctaveFmt) << sep; -std::cout << m1.format(HeavyFmt) << sep; diff --git a/eigen/doc/snippets/JacobiSVD_basic.cpp b/eigen/doc/snippets/JacobiSVD_basic.cpp deleted file mode 100644 index ab24b9b..0000000 --- a/eigen/doc/snippets/JacobiSVD_basic.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXf m = MatrixXf::Random(3,2); -cout << "Here is the matrix m:" << endl << m << endl; -JacobiSVD<MatrixXf> svd(m, ComputeThinU | ComputeThinV); -cout << "Its singular values are:" << endl << svd.singularValues() << endl; -cout << "Its left singular vectors are the columns of the thin U matrix:" << endl << svd.matrixU() << endl; -cout << "Its right singular vectors are the columns of the thin V matrix:" << endl << svd.matrixV() << endl; -Vector3f rhs(1, 0, 0); -cout << "Now consider this rhs vector:" << endl << rhs << endl; -cout << "A least-squares solution of m*x = rhs is:" << endl << svd.solve(rhs) << endl; diff --git a/eigen/doc/snippets/Jacobi_makeGivens.cpp b/eigen/doc/snippets/Jacobi_makeGivens.cpp deleted file mode 100644 index 4b733c3..0000000 --- a/eigen/doc/snippets/Jacobi_makeGivens.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Vector2f v = Vector2f::Random(); -JacobiRotation<float> G; -G.makeGivens(v.x(), v.y()); -cout << "Here is the vector v:" << endl << v << endl; -v.applyOnTheLeft(0, 1, G.adjoint()); -cout << "Here is the vector J' * v:" << endl << v << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/Jacobi_makeJacobi.cpp b/eigen/doc/snippets/Jacobi_makeJacobi.cpp deleted file mode 100644 index 0cc331d..0000000 --- a/eigen/doc/snippets/Jacobi_makeJacobi.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix2f m = Matrix2f::Random(); -m = (m + m.adjoint()).eval(); -JacobiRotation<float> J; -J.makeJacobi(m, 0, 1); -cout << "Here is the matrix m:" << endl << m << endl; -m.applyOnTheLeft(0, 1, J.adjoint()); -m.applyOnTheRight(0, 1, J); -cout << "Here is the matrix J' * m * J:" << endl << m << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/LLT_example.cpp b/eigen/doc/snippets/LLT_example.cpp deleted file mode 100644 index 46fb407..0000000 --- a/eigen/doc/snippets/LLT_example.cpp +++ /dev/null @@ -1,12 +0,0 @@ -MatrixXd A(3,3); -A << 4,-1,2, -1,6,0, 2,0,5; -cout << "The matrix A is" << endl << A << endl; - -LLT<MatrixXd> lltOfA(A); // compute the Cholesky decomposition of A -MatrixXd L = lltOfA.matrixL(); // retrieve factor L in the decomposition -// The previous two lines can also be written as "L = A.llt().matrixL()" - -cout << "The Cholesky factor L is" << endl << L << endl; -cout << "To check this, let us compute L * L.transpose()" << endl; -cout << L * L.transpose() << endl; -cout << "This should equal the matrix A" << endl; diff --git a/eigen/doc/snippets/LLT_solve.cpp b/eigen/doc/snippets/LLT_solve.cpp deleted file mode 100644 index 7095d2c..0000000 --- a/eigen/doc/snippets/LLT_solve.cpp +++ /dev/null @@ -1,8 +0,0 @@ -typedef Matrix<float,Dynamic,2> DataMatrix; -// let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise) -DataMatrix samples = DataMatrix::Random(12,2); -VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1; -// and let's solve samples * [x y]^T = elevations in least square sense: -Matrix<float,2,1> xy - = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations)); -cout << xy << endl; diff --git a/eigen/doc/snippets/LeastSquaresNormalEquations.cpp b/eigen/doc/snippets/LeastSquaresNormalEquations.cpp deleted file mode 100644 index 997cf17..0000000 --- a/eigen/doc/snippets/LeastSquaresNormalEquations.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXf A = MatrixXf::Random(3, 2); -VectorXf b = VectorXf::Random(3); -cout << "The solution using normal equations is:\n" - << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl; diff --git a/eigen/doc/snippets/LeastSquaresQR.cpp b/eigen/doc/snippets/LeastSquaresQR.cpp deleted file mode 100644 index 6c97045..0000000 --- a/eigen/doc/snippets/LeastSquaresQR.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXf A = MatrixXf::Random(3, 2); -VectorXf b = VectorXf::Random(3); -cout << "The solution using the QR decomposition is:\n" - << A.colPivHouseholderQr().solve(b) << endl; diff --git a/eigen/doc/snippets/Map_general_stride.cpp b/eigen/doc/snippets/Map_general_stride.cpp deleted file mode 100644 index 0657e7f..0000000 --- a/eigen/doc/snippets/Map_general_stride.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int array[24]; -for(int i = 0; i < 24; ++i) array[i] = i; -cout << Map<MatrixXi, 0, Stride<Dynamic,2> > - (array, 3, 3, Stride<Dynamic,2>(8, 2)) - << endl; diff --git a/eigen/doc/snippets/Map_inner_stride.cpp b/eigen/doc/snippets/Map_inner_stride.cpp deleted file mode 100644 index d95ae9b..0000000 --- a/eigen/doc/snippets/Map_inner_stride.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int array[12]; -for(int i = 0; i < 12; ++i) array[i] = i; -cout << Map<VectorXi, 0, InnerStride<2> > - (array, 6) // the inner stride has already been passed as template parameter - << endl; diff --git a/eigen/doc/snippets/Map_outer_stride.cpp b/eigen/doc/snippets/Map_outer_stride.cpp deleted file mode 100644 index 2f6f052..0000000 --- a/eigen/doc/snippets/Map_outer_stride.cpp +++ /dev/null @@ -1,3 +0,0 @@ -int array[12]; -for(int i = 0; i < 12; ++i) array[i] = i; -cout << Map<MatrixXi, 0, OuterStride<> >(array, 3, 3, OuterStride<>(4)) << endl; diff --git a/eigen/doc/snippets/Map_placement_new.cpp b/eigen/doc/snippets/Map_placement_new.cpp deleted file mode 100644 index 2e40eca..0000000 --- a/eigen/doc/snippets/Map_placement_new.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int data[] = {1,2,3,4,5,6,7,8,9}; -Map<RowVectorXi> v(data,4); -cout << "The mapped vector v is: " << v << "\n"; -new (&v) Map<RowVectorXi>(data+4,5); -cout << "Now v is: " << v << "\n";
\ No newline at end of file diff --git a/eigen/doc/snippets/Map_simple.cpp b/eigen/doc/snippets/Map_simple.cpp deleted file mode 100644 index 423bb52..0000000 --- a/eigen/doc/snippets/Map_simple.cpp +++ /dev/null @@ -1,3 +0,0 @@ -int array[9]; -for(int i = 0; i < 9; ++i) array[i] = i; -cout << Map<Matrix3i>(array) << endl; diff --git a/eigen/doc/snippets/MatrixBase_adjoint.cpp b/eigen/doc/snippets/MatrixBase_adjoint.cpp deleted file mode 100644 index 4680d59..0000000 --- a/eigen/doc/snippets/MatrixBase_adjoint.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix2cf m = Matrix2cf::Random(); -cout << "Here is the 2x2 complex matrix m:" << endl << m << endl; -cout << "Here is the adjoint of m:" << endl << m.adjoint() << endl; diff --git a/eigen/doc/snippets/MatrixBase_all.cpp b/eigen/doc/snippets/MatrixBase_all.cpp deleted file mode 100644 index 46f26f1..0000000 --- a/eigen/doc/snippets/MatrixBase_all.cpp +++ /dev/null @@ -1,7 +0,0 @@ -Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones()); -Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs(); -// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax: -cout << "Is (" << p0.transpose() << ") inside the box: " - << ((boxMin.array()<p0.array()).all() && (boxMax.array()>p0.array()).all()) << endl; -cout << "Is (" << p1.transpose() << ") inside the box: " - << ((boxMin.array()<p1.array()).all() && (boxMax.array()>p1.array()).all()) << endl; diff --git a/eigen/doc/snippets/MatrixBase_applyOnTheLeft.cpp b/eigen/doc/snippets/MatrixBase_applyOnTheLeft.cpp deleted file mode 100644 index 6398c87..0000000 --- a/eigen/doc/snippets/MatrixBase_applyOnTheLeft.cpp +++ /dev/null @@ -1,7 +0,0 @@ -Matrix3f A = Matrix3f::Random(3,3), B; -B << 0,1,0, - 0,0,1, - 1,0,0; -cout << "At start, A = " << endl << A << endl; -A.applyOnTheLeft(B); -cout << "After applyOnTheLeft, A = " << endl << A << endl; diff --git a/eigen/doc/snippets/MatrixBase_applyOnTheRight.cpp b/eigen/doc/snippets/MatrixBase_applyOnTheRight.cpp deleted file mode 100644 index e4b71b2..0000000 --- a/eigen/doc/snippets/MatrixBase_applyOnTheRight.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Matrix3f A = Matrix3f::Random(3,3), B; -B << 0,1,0, - 0,0,1, - 1,0,0; -cout << "At start, A = " << endl << A << endl; -A *= B; -cout << "After A *= B, A = " << endl << A << endl; -A.applyOnTheRight(B); // equivalent to A *= B -cout << "After applyOnTheRight, A = " << endl << A << endl; diff --git a/eigen/doc/snippets/MatrixBase_array.cpp b/eigen/doc/snippets/MatrixBase_array.cpp deleted file mode 100644 index f215086..0000000 --- a/eigen/doc/snippets/MatrixBase_array.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Vector3d v(1,2,3); -v.array() += 3; -v.array() -= 2; -cout << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_array_const.cpp b/eigen/doc/snippets/MatrixBase_array_const.cpp deleted file mode 100644 index cd3b26a..0000000 --- a/eigen/doc/snippets/MatrixBase_array_const.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Vector3d v(-1,2,-3); -cout << "the absolute values:" << endl << v.array().abs() << endl; -cout << "the absolute values plus one:" << endl << v.array().abs()+1 << endl; -cout << "sum of the squares: " << v.array().square().sum() << endl; diff --git a/eigen/doc/snippets/MatrixBase_asDiagonal.cpp b/eigen/doc/snippets/MatrixBase_asDiagonal.cpp deleted file mode 100644 index b01082d..0000000 --- a/eigen/doc/snippets/MatrixBase_asDiagonal.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << Matrix3i(Vector3i(2,5,6).asDiagonal()) << endl; diff --git a/eigen/doc/snippets/MatrixBase_block_int_int.cpp b/eigen/doc/snippets/MatrixBase_block_int_int.cpp deleted file mode 100644 index f99b6d4..0000000 --- a/eigen/doc/snippets/MatrixBase_block_int_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.block<2,2>(1,1):" << endl << m.block<2,2>(1,1) << endl; -m.block<2,2>(1,1).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_block_int_int_int_int.cpp b/eigen/doc/snippets/MatrixBase_block_int_int_int_int.cpp deleted file mode 100644 index 7238cbb..0000000 --- a/eigen/doc/snippets/MatrixBase_block_int_int_int_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.block(1, 1, 2, 2):" << endl << m.block(1, 1, 2, 2) << endl; -m.block(1, 1, 2, 2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp deleted file mode 100644 index ebae95e..0000000 --- a/eigen/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomLeftCorner(2, 2):" << endl; -cout << m.bottomLeftCorner(2, 2) << endl; -m.bottomLeftCorner(2, 2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp deleted file mode 100644 index bf05093..0000000 --- a/eigen/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomRightCorner(2, 2):" << endl; -cout << m.bottomRightCorner(2, 2) << endl; -m.bottomRightCorner(2, 2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_bottomRows_int.cpp b/eigen/doc/snippets/MatrixBase_bottomRows_int.cpp deleted file mode 100644 index 47ca92e..0000000 --- a/eigen/doc/snippets/MatrixBase_bottomRows_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.bottomRows(2):" << endl; -cout << a.bottomRows(2) << endl; -a.bottomRows(2).setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_cast.cpp b/eigen/doc/snippets/MatrixBase_cast.cpp deleted file mode 100644 index 016880b..0000000 --- a/eigen/doc/snippets/MatrixBase_cast.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix2d md = Matrix2d::Identity() * 0.45; -Matrix2f mf = Matrix2f::Identity(); -cout << md + mf.cast<double>() << endl; diff --git a/eigen/doc/snippets/MatrixBase_col.cpp b/eigen/doc/snippets/MatrixBase_col.cpp deleted file mode 100644 index 87c91b1..0000000 --- a/eigen/doc/snippets/MatrixBase_col.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Identity(); -m.col(1) = Vector3d(4,5,6); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_colwise.cpp b/eigen/doc/snippets/MatrixBase_colwise.cpp deleted file mode 100644 index a048bef..0000000 --- a/eigen/doc/snippets/MatrixBase_colwise.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the sum of each column:" << endl << m.colwise().sum() << endl; -cout << "Here is the maximum absolute value of each column:" - << endl << m.cwiseAbs().colwise().maxCoeff() << endl; diff --git a/eigen/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp b/eigen/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp deleted file mode 100644 index a7b084f..0000000 --- a/eigen/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -Matrix3d inverse; -bool invertible; -double determinant; -m.computeInverseAndDetWithCheck(inverse,determinant,invertible); -cout << "Its determinant is " << determinant << endl; -if(invertible) { - cout << "It is invertible, and its inverse is:" << endl << inverse << endl; -} -else { - cout << "It is not invertible." << endl; -} diff --git a/eigen/doc/snippets/MatrixBase_computeInverseWithCheck.cpp b/eigen/doc/snippets/MatrixBase_computeInverseWithCheck.cpp deleted file mode 100644 index 873a9f8..0000000 --- a/eigen/doc/snippets/MatrixBase_computeInverseWithCheck.cpp +++ /dev/null @@ -1,11 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -Matrix3d inverse; -bool invertible; -m.computeInverseWithCheck(inverse,invertible); -if(invertible) { - cout << "It is invertible, and its inverse is:" << endl << inverse << endl; -} -else { - cout << "It is not invertible." << endl; -} diff --git a/eigen/doc/snippets/MatrixBase_cwiseAbs.cpp b/eigen/doc/snippets/MatrixBase_cwiseAbs.cpp deleted file mode 100644 index 28a3160..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseAbs.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd m(2,3); -m << 2, -4, 6, - -5, 1, 0; -cout << m.cwiseAbs() << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseAbs2.cpp b/eigen/doc/snippets/MatrixBase_cwiseAbs2.cpp deleted file mode 100644 index 889a2e2..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseAbs2.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd m(2,3); -m << 2, -4, 6, - -5, 1, 0; -cout << m.cwiseAbs2() << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp b/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp deleted file mode 100644 index 469af64..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXi m(2,2); -m << 1, 0, - 1, 1; -cout << "Comparing m with identity matrix:" << endl; -cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl; -Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count(); -cout << "Number of coefficients that are equal: " << count << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseInverse.cpp b/eigen/doc/snippets/MatrixBase_cwiseInverse.cpp deleted file mode 100644 index 23e08f7..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseInverse.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd m(2,3); -m << 2, 0.5, 1, - 3, 0.25, 1; -cout << m.cwiseInverse() << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseMax.cpp b/eigen/doc/snippets/MatrixBase_cwiseMax.cpp deleted file mode 100644 index 3c95681..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseMax.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Vector3d v(2,3,4), w(4,2,3); -cout << v.cwiseMax(w) << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseMin.cpp b/eigen/doc/snippets/MatrixBase_cwiseMin.cpp deleted file mode 100644 index 82fc761..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseMin.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Vector3d v(2,3,4), w(4,2,3); -cout << v.cwiseMin(w) << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseNotEqual.cpp b/eigen/doc/snippets/MatrixBase_cwiseNotEqual.cpp deleted file mode 100644 index 7f0a105..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseNotEqual.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXi m(2,2); -m << 1, 0, - 1, 1; -cout << "Comparing m with identity matrix:" << endl; -cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl; -Index count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count(); -cout << "Number of coefficients that are not equal: " << count << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseProduct.cpp b/eigen/doc/snippets/MatrixBase_cwiseProduct.cpp deleted file mode 100644 index 1db3a11..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseProduct.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random(); -Matrix3i c = a.cwiseProduct(b); -cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl; - diff --git a/eigen/doc/snippets/MatrixBase_cwiseQuotient.cpp b/eigen/doc/snippets/MatrixBase_cwiseQuotient.cpp deleted file mode 100644 index 9691212..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseQuotient.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Vector3d v(2,3,4), w(4,2,3); -cout << v.cwiseQuotient(w) << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseSign.cpp b/eigen/doc/snippets/MatrixBase_cwiseSign.cpp deleted file mode 100644 index efd7179..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseSign.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd m(2,3); -m << 2, -4, 6, - -5, 1, 0; -cout << m.cwiseSign() << endl; diff --git a/eigen/doc/snippets/MatrixBase_cwiseSqrt.cpp b/eigen/doc/snippets/MatrixBase_cwiseSqrt.cpp deleted file mode 100644 index 4bfd75d..0000000 --- a/eigen/doc/snippets/MatrixBase_cwiseSqrt.cpp +++ /dev/null @@ -1,2 +0,0 @@ -Vector3d v(1,2,4); -cout << v.cwiseSqrt() << endl; diff --git a/eigen/doc/snippets/MatrixBase_diagonal.cpp b/eigen/doc/snippets/MatrixBase_diagonal.cpp deleted file mode 100644 index cd63413..0000000 --- a/eigen/doc/snippets/MatrixBase_diagonal.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Matrix3i m = Matrix3i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here are the coefficients on the main diagonal of m:" << endl - << m.diagonal() << endl; diff --git a/eigen/doc/snippets/MatrixBase_diagonal_int.cpp b/eigen/doc/snippets/MatrixBase_diagonal_int.cpp deleted file mode 100644 index 7b66abf..0000000 --- a/eigen/doc/snippets/MatrixBase_diagonal_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl - << m.diagonal(1).transpose() << endl - << m.diagonal(-2).transpose() << endl; diff --git a/eigen/doc/snippets/MatrixBase_diagonal_template_int.cpp b/eigen/doc/snippets/MatrixBase_diagonal_template_int.cpp deleted file mode 100644 index 0e73d1c..0000000 --- a/eigen/doc/snippets/MatrixBase_diagonal_template_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl - << m.diagonal<1>().transpose() << endl - << m.diagonal<-2>().transpose() << endl; diff --git a/eigen/doc/snippets/MatrixBase_eigenvalues.cpp b/eigen/doc/snippets/MatrixBase_eigenvalues.cpp deleted file mode 100644 index 039f887..0000000 --- a/eigen/doc/snippets/MatrixBase_eigenvalues.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -VectorXcd eivals = ones.eigenvalues(); -cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl; diff --git a/eigen/doc/snippets/MatrixBase_end_int.cpp b/eigen/doc/snippets/MatrixBase_end_int.cpp deleted file mode 100644 index 03c54a9..0000000 --- a/eigen/doc/snippets/MatrixBase_end_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.tail(2):" << endl << v.tail(2) << endl; -v.tail(2).setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_eval.cpp b/eigen/doc/snippets/MatrixBase_eval.cpp deleted file mode 100644 index 1df3aa0..0000000 --- a/eigen/doc/snippets/MatrixBase_eval.cpp +++ /dev/null @@ -1,12 +0,0 @@ -Matrix2f M = Matrix2f::Random(); -Matrix2f m; -m = M; -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Now we want to copy a column into a row." << endl; -cout << "If we do m.col(1) = m.row(0), then m becomes:" << endl; -m.col(1) = m.row(0); -cout << m << endl << "which is wrong!" << endl; -cout << "Now let us instead do m.col(1) = m.row(0).eval(). Then m becomes" << endl; -m = M; -m.col(1) = m.row(0).eval(); -cout << m << endl << "which is right." << endl; diff --git a/eigen/doc/snippets/MatrixBase_fixedBlock_int_int.cpp b/eigen/doc/snippets/MatrixBase_fixedBlock_int_int.cpp deleted file mode 100644 index 3201127..0000000 --- a/eigen/doc/snippets/MatrixBase_fixedBlock_int_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4d m = Vector4d(1,2,3,4).asDiagonal(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.fixed<2, 2>(2, 2):" << endl << m.block<2, 2>(2, 2) << endl; -m.block<2, 2>(2, 0) = m.block<2, 2>(2, 2); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_hnormalized.cpp b/eigen/doc/snippets/MatrixBase_hnormalized.cpp deleted file mode 100644 index 652cd77..0000000 --- a/eigen/doc/snippets/MatrixBase_hnormalized.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Vector4d v = Vector4d::Random(); -Projective3d P(Matrix4d::Random()); -cout << "v = " << v.transpose() << "]^T" << endl; -cout << "v.hnormalized() = " << v.hnormalized().transpose() << "]^T" << endl; -cout << "P*v = " << (P*v).transpose() << "]^T" << endl; -cout << "(P*v).hnormalized() = " << (P*v).hnormalized().transpose() << "]^T" << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/MatrixBase_homogeneous.cpp b/eigen/doc/snippets/MatrixBase_homogeneous.cpp deleted file mode 100644 index 457c28f..0000000 --- a/eigen/doc/snippets/MatrixBase_homogeneous.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Vector3d v = Vector3d::Random(), w; -Projective3d P(Matrix4d::Random()); -cout << "v = [" << v.transpose() << "]^T" << endl; -cout << "h.homogeneous() = [" << v.homogeneous().transpose() << "]^T" << endl; -cout << "(P * v.homogeneous()) = [" << (P * v.homogeneous()).transpose() << "]^T" << endl; -cout << "(P * v.homogeneous()).hnormalized() = [" << (P * v.homogeneous()).eval().hnormalized().transpose() << "]^T" << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/MatrixBase_identity.cpp b/eigen/doc/snippets/MatrixBase_identity.cpp deleted file mode 100644 index b5c1e59..0000000 --- a/eigen/doc/snippets/MatrixBase_identity.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << Matrix<double, 3, 4>::Identity() << endl; diff --git a/eigen/doc/snippets/MatrixBase_identity_int_int.cpp b/eigen/doc/snippets/MatrixBase_identity_int_int.cpp deleted file mode 100644 index 918649d..0000000 --- a/eigen/doc/snippets/MatrixBase_identity_int_int.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << MatrixXd::Identity(4, 3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_inverse.cpp b/eigen/doc/snippets/MatrixBase_inverse.cpp deleted file mode 100644 index a56142e..0000000 --- a/eigen/doc/snippets/MatrixBase_inverse.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Its inverse is:" << endl << m.inverse() << endl; diff --git a/eigen/doc/snippets/MatrixBase_isDiagonal.cpp b/eigen/doc/snippets/MatrixBase_isDiagonal.cpp deleted file mode 100644 index 5b1d599..0000000 --- a/eigen/doc/snippets/MatrixBase_isDiagonal.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix3d m = 10000 * Matrix3d::Identity(); -m(0,2) = 1; -cout << "Here's the matrix m:" << endl << m << endl; -cout << "m.isDiagonal() returns: " << m.isDiagonal() << endl; -cout << "m.isDiagonal(1e-3) returns: " << m.isDiagonal(1e-3) << endl; - diff --git a/eigen/doc/snippets/MatrixBase_isIdentity.cpp b/eigen/doc/snippets/MatrixBase_isIdentity.cpp deleted file mode 100644 index 17b756c..0000000 --- a/eigen/doc/snippets/MatrixBase_isIdentity.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Identity(); -m(0,2) = 1e-4; -cout << "Here's the matrix m:" << endl << m << endl; -cout << "m.isIdentity() returns: " << m.isIdentity() << endl; -cout << "m.isIdentity(1e-3) returns: " << m.isIdentity(1e-3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_isOnes.cpp b/eigen/doc/snippets/MatrixBase_isOnes.cpp deleted file mode 100644 index f82f628..0000000 --- a/eigen/doc/snippets/MatrixBase_isOnes.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Ones(); -m(0,2) += 1e-4; -cout << "Here's the matrix m:" << endl << m << endl; -cout << "m.isOnes() returns: " << m.isOnes() << endl; -cout << "m.isOnes(1e-3) returns: " << m.isOnes(1e-3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_isOrthogonal.cpp b/eigen/doc/snippets/MatrixBase_isOrthogonal.cpp deleted file mode 100644 index b22af06..0000000 --- a/eigen/doc/snippets/MatrixBase_isOrthogonal.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Vector3d v(1,0,0); -Vector3d w(1e-4,0,1); -cout << "Here's the vector v:" << endl << v << endl; -cout << "Here's the vector w:" << endl << w << endl; -cout << "v.isOrthogonal(w) returns: " << v.isOrthogonal(w) << endl; -cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal(w,1e-3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_isUnitary.cpp b/eigen/doc/snippets/MatrixBase_isUnitary.cpp deleted file mode 100644 index 3877da3..0000000 --- a/eigen/doc/snippets/MatrixBase_isUnitary.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Identity(); -m(0,2) = 1e-4; -cout << "Here's the matrix m:" << endl << m << endl; -cout << "m.isUnitary() returns: " << m.isUnitary() << endl; -cout << "m.isUnitary(1e-3) returns: " << m.isUnitary(1e-3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_isZero.cpp b/eigen/doc/snippets/MatrixBase_isZero.cpp deleted file mode 100644 index c2cfe22..0000000 --- a/eigen/doc/snippets/MatrixBase_isZero.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Zero(); -m(0,2) = 1e-4; -cout << "Here's the matrix m:" << endl << m << endl; -cout << "m.isZero() returns: " << m.isZero() << endl; -cout << "m.isZero(1e-3) returns: " << m.isZero(1e-3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_leftCols_int.cpp b/eigen/doc/snippets/MatrixBase_leftCols_int.cpp deleted file mode 100644 index 6ea984e..0000000 --- a/eigen/doc/snippets/MatrixBase_leftCols_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.leftCols(2):" << endl; -cout << a.leftCols(2) << endl; -a.leftCols(2).setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_noalias.cpp b/eigen/doc/snippets/MatrixBase_noalias.cpp deleted file mode 100644 index 3b54a79..0000000 --- a/eigen/doc/snippets/MatrixBase_noalias.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix2d a, b, c; a << 1,2,3,4; b << 5,6,7,8; -c.noalias() = a * b; // this computes the product directly to c -cout << c << endl; diff --git a/eigen/doc/snippets/MatrixBase_ones.cpp b/eigen/doc/snippets/MatrixBase_ones.cpp deleted file mode 100644 index 02c767c..0000000 --- a/eigen/doc/snippets/MatrixBase_ones.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << Matrix2d::Ones() << endl; -cout << 6 * RowVector4i::Ones() << endl; diff --git a/eigen/doc/snippets/MatrixBase_ones_int.cpp b/eigen/doc/snippets/MatrixBase_ones_int.cpp deleted file mode 100644 index 2ef188e..0000000 --- a/eigen/doc/snippets/MatrixBase_ones_int.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << 6 * RowVectorXi::Ones(4) << endl; -cout << VectorXf::Ones(2) << endl; diff --git a/eigen/doc/snippets/MatrixBase_ones_int_int.cpp b/eigen/doc/snippets/MatrixBase_ones_int_int.cpp deleted file mode 100644 index 60f5a31..0000000 --- a/eigen/doc/snippets/MatrixBase_ones_int_int.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << MatrixXi::Ones(2,3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_operatorNorm.cpp b/eigen/doc/snippets/MatrixBase_operatorNorm.cpp deleted file mode 100644 index 355246f..0000000 --- a/eigen/doc/snippets/MatrixBase_operatorNorm.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -cout << "The operator norm of the 3x3 matrix of ones is " - << ones.operatorNorm() << endl; diff --git a/eigen/doc/snippets/MatrixBase_prod.cpp b/eigen/doc/snippets/MatrixBase_prod.cpp deleted file mode 100644 index d2f27bd..0000000 --- a/eigen/doc/snippets/MatrixBase_prod.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the product of all the coefficients:" << endl << m.prod() << endl; diff --git a/eigen/doc/snippets/MatrixBase_random.cpp b/eigen/doc/snippets/MatrixBase_random.cpp deleted file mode 100644 index 65fc524..0000000 --- a/eigen/doc/snippets/MatrixBase_random.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << 100 * Matrix2i::Random() << endl; diff --git a/eigen/doc/snippets/MatrixBase_random_int.cpp b/eigen/doc/snippets/MatrixBase_random_int.cpp deleted file mode 100644 index f161d03..0000000 --- a/eigen/doc/snippets/MatrixBase_random_int.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << VectorXi::Random(2) << endl; diff --git a/eigen/doc/snippets/MatrixBase_random_int_int.cpp b/eigen/doc/snippets/MatrixBase_random_int_int.cpp deleted file mode 100644 index 3f0f7dd..0000000 --- a/eigen/doc/snippets/MatrixBase_random_int_int.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << MatrixXi::Random(2,3) << endl; diff --git a/eigen/doc/snippets/MatrixBase_replicate.cpp b/eigen/doc/snippets/MatrixBase_replicate.cpp deleted file mode 100644 index 3ce52bc..0000000 --- a/eigen/doc/snippets/MatrixBase_replicate.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXi m = MatrixXi::Random(2,3); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "m.replicate<3,2>() = ..." << endl; -cout << m.replicate<3,2>() << endl; diff --git a/eigen/doc/snippets/MatrixBase_replicate_int_int.cpp b/eigen/doc/snippets/MatrixBase_replicate_int_int.cpp deleted file mode 100644 index b1dbc70..0000000 --- a/eigen/doc/snippets/MatrixBase_replicate_int_int.cpp +++ /dev/null @@ -1,4 +0,0 @@ -Vector3i v = Vector3i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "v.replicate(2,5) = ..." << endl; -cout << v.replicate(2,5) << endl; diff --git a/eigen/doc/snippets/MatrixBase_reverse.cpp b/eigen/doc/snippets/MatrixBase_reverse.cpp deleted file mode 100644 index f545a28..0000000 --- a/eigen/doc/snippets/MatrixBase_reverse.cpp +++ /dev/null @@ -1,8 +0,0 @@ -MatrixXi m = MatrixXi::Random(3,4); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the reverse of m:" << endl << m.reverse() << endl; -cout << "Here is the coefficient (1,0) in the reverse of m:" << endl - << m.reverse()(1,0) << endl; -cout << "Let us overwrite this coefficient with the value 4." << endl; -m.reverse()(1,0) = 4; -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_rightCols_int.cpp b/eigen/doc/snippets/MatrixBase_rightCols_int.cpp deleted file mode 100644 index cb51340..0000000 --- a/eigen/doc/snippets/MatrixBase_rightCols_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.rightCols(2):" << endl; -cout << a.rightCols(2) << endl; -a.rightCols(2).setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_row.cpp b/eigen/doc/snippets/MatrixBase_row.cpp deleted file mode 100644 index b15e626..0000000 --- a/eigen/doc/snippets/MatrixBase_row.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Identity(); -m.row(1) = Vector3d(4,5,6); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_rowwise.cpp b/eigen/doc/snippets/MatrixBase_rowwise.cpp deleted file mode 100644 index ae93964..0000000 --- a/eigen/doc/snippets/MatrixBase_rowwise.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl; -cout << "Here is the maximum absolute value of each row:" - << endl << m.cwiseAbs().rowwise().maxCoeff() << endl; diff --git a/eigen/doc/snippets/MatrixBase_segment_int_int.cpp b/eigen/doc/snippets/MatrixBase_segment_int_int.cpp deleted file mode 100644 index 70cd6d2..0000000 --- a/eigen/doc/snippets/MatrixBase_segment_int_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.segment(1, 2):" << endl << v.segment(1, 2) << endl; -v.segment(1, 2).setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_select.cpp b/eigen/doc/snippets/MatrixBase_select.cpp deleted file mode 100644 index ae5477f..0000000 --- a/eigen/doc/snippets/MatrixBase_select.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXi m(3, 3); -m << 1, 2, 3, - 4, 5, 6, - 7, 8, 9; -m = (m.array() >= 5).select(-m, m); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_selfadjointView.cpp b/eigen/doc/snippets/MatrixBase_selfadjointView.cpp deleted file mode 100644 index 4bd3c7e..0000000 --- a/eigen/doc/snippets/MatrixBase_selfadjointView.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix3i m = Matrix3i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the symmetric matrix extracted from the upper part of m:" << endl - << Matrix3i(m.selfadjointView<Upper>()) << endl; -cout << "Here is the symmetric matrix extracted from the lower part of m:" << endl - << Matrix3i(m.selfadjointView<Lower>()) << endl; diff --git a/eigen/doc/snippets/MatrixBase_set.cpp b/eigen/doc/snippets/MatrixBase_set.cpp deleted file mode 100644 index 50ecf5f..0000000 --- a/eigen/doc/snippets/MatrixBase_set.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Matrix3i m1; -m1 << 1, 2, 3, - 4, 5, 6, - 7, 8, 9; -cout << m1 << endl << endl; -Matrix3i m2 = Matrix3i::Identity(); -m2.block(0,0, 2,2) << 10, 11, 12, 13; -cout << m2 << endl << endl; -Vector2i v1; -v1 << 14, 15; -m2 << v1.transpose(), 16, - v1, m1.block(1,1,2,2); -cout << m2 << endl; diff --git a/eigen/doc/snippets/MatrixBase_setIdentity.cpp b/eigen/doc/snippets/MatrixBase_setIdentity.cpp deleted file mode 100644 index 4fd0aa2..0000000 --- a/eigen/doc/snippets/MatrixBase_setIdentity.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix4i m = Matrix4i::Zero(); -m.block<3,3>(1,0).setIdentity(); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_setOnes.cpp b/eigen/doc/snippets/MatrixBase_setOnes.cpp deleted file mode 100644 index 4cef9c1..0000000 --- a/eigen/doc/snippets/MatrixBase_setOnes.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -m.row(1).setOnes(); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_setRandom.cpp b/eigen/doc/snippets/MatrixBase_setRandom.cpp deleted file mode 100644 index e2c257d..0000000 --- a/eigen/doc/snippets/MatrixBase_setRandom.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix4i m = Matrix4i::Zero(); -m.col(1).setRandom(); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_setZero.cpp b/eigen/doc/snippets/MatrixBase_setZero.cpp deleted file mode 100644 index 9b5b958..0000000 --- a/eigen/doc/snippets/MatrixBase_setZero.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -m.row(1).setZero(); -cout << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_start_int.cpp b/eigen/doc/snippets/MatrixBase_start_int.cpp deleted file mode 100644 index c261d2b..0000000 --- a/eigen/doc/snippets/MatrixBase_start_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.head(2):" << endl << v.head(2) << endl; -v.head(2).setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_bottomRows.cpp b/eigen/doc/snippets/MatrixBase_template_int_bottomRows.cpp deleted file mode 100644 index f9ea892..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_bottomRows.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.bottomRows<2>():" << endl; -cout << a.bottomRows<2>() << endl; -a.bottomRows<2>().setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_end.cpp b/eigen/doc/snippets/MatrixBase_template_int_end.cpp deleted file mode 100644 index f5ccb00..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_end.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.tail(2):" << endl << v.tail<2>() << endl; -v.tail<2>().setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp deleted file mode 100644 index 4dced03..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the block:" << endl << m.block<2, Dynamic>(1, 1, 2, 3) << endl; -m.block<2, Dynamic>(1, 1, 2, 3).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp deleted file mode 100644 index 847892a..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomLeftCorner<2,2>():" << endl; -cout << m.bottomLeftCorner<2,2>() << endl; -m.bottomLeftCorner<2,2>().setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp deleted file mode 100644 index a1edcc8..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomLeftCorner<2,Dynamic>(2,2):" << endl; -cout << m.bottomLeftCorner<2,Dynamic>(2,2) << endl; -m.bottomLeftCorner<2,Dynamic>(2,2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp deleted file mode 100644 index abacb01..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomRightCorner<2,2>():" << endl; -cout << m.bottomRightCorner<2,2>() << endl; -m.bottomRightCorner<2,2>().setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp deleted file mode 100644 index a65508f..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.bottomRightCorner<2,Dynamic>(2,2):" << endl; -cout << m.bottomRightCorner<2,Dynamic>(2,2) << endl; -m.bottomRightCorner<2,Dynamic>(2,2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp deleted file mode 100644 index 1899d90..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topLeftCorner<2,2>():" << endl; -cout << m.topLeftCorner<2,2>() << endl; -m.topLeftCorner<2,2>().setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp deleted file mode 100644 index fac761f..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topLeftCorner<2,Dynamic>(2,2):" << endl; -cout << m.topLeftCorner<2,Dynamic>(2,2) << endl; -m.topLeftCorner<2,Dynamic>(2,2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp deleted file mode 100644 index c3a1771..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topRightCorner<2,2>():" << endl; -cout << m.topRightCorner<2,2>() << endl; -m.topRightCorner<2,2>().setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp deleted file mode 100644 index a17acc0..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topRightCorner<2,Dynamic>(2,2):" << endl; -cout << m.topRightCorner<2,Dynamic>(2,2) << endl; -m.topRightCorner<2,Dynamic>(2,2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_leftCols.cpp b/eigen/doc/snippets/MatrixBase_template_int_leftCols.cpp deleted file mode 100644 index 1c425d9..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_leftCols.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.leftCols<2>():" << endl; -cout << a.leftCols<2>() << endl; -a.leftCols<2>().setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_rightCols.cpp b/eigen/doc/snippets/MatrixBase_template_int_rightCols.cpp deleted file mode 100644 index fc8c0d9..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_rightCols.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.rightCols<2>():" << endl; -cout << a.rightCols<2>() << endl; -a.rightCols<2>().setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_segment.cpp b/eigen/doc/snippets/MatrixBase_template_int_segment.cpp deleted file mode 100644 index e448b40..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_segment.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.segment<2>(1):" << endl << v.segment<2>(1) << endl; -v.segment<2>(2).setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_start.cpp b/eigen/doc/snippets/MatrixBase_template_int_start.cpp deleted file mode 100644 index d336b37..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_start.cpp +++ /dev/null @@ -1,5 +0,0 @@ -RowVector4i v = RowVector4i::Random(); -cout << "Here is the vector v:" << endl << v << endl; -cout << "Here is v.head(2):" << endl << v.head<2>() << endl; -v.head<2>().setZero(); -cout << "Now the vector v is:" << endl << v << endl; diff --git a/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp b/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp deleted file mode 100644 index 0110251..0000000 --- a/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.topRows<2>():" << endl; -cout << a.topRows<2>() << endl; -a.topRows<2>().setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp deleted file mode 100644 index e52cb3b..0000000 --- a/eigen/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topLeftCorner(2, 2):" << endl; -cout << m.topLeftCorner(2, 2) << endl; -m.topLeftCorner(2, 2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_topRightCorner_int_int.cpp b/eigen/doc/snippets/MatrixBase_topRightCorner_int_int.cpp deleted file mode 100644 index 811fa56..0000000 --- a/eigen/doc/snippets/MatrixBase_topRightCorner_int_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4i m = Matrix4i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.topRightCorner(2, 2):" << endl; -cout << m.topRightCorner(2, 2) << endl; -m.topRightCorner(2, 2).setZero(); -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_topRows_int.cpp b/eigen/doc/snippets/MatrixBase_topRows_int.cpp deleted file mode 100644 index f2d75f1..0000000 --- a/eigen/doc/snippets/MatrixBase_topRows_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Array44i a = Array44i::Random(); -cout << "Here is the array a:" << endl << a << endl; -cout << "Here is a.topRows(2):" << endl; -cout << a.topRows(2) << endl; -a.topRows(2).setZero(); -cout << "Now the array a is:" << endl << a << endl; diff --git a/eigen/doc/snippets/MatrixBase_transpose.cpp b/eigen/doc/snippets/MatrixBase_transpose.cpp deleted file mode 100644 index 88eea83..0000000 --- a/eigen/doc/snippets/MatrixBase_transpose.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix2i m = Matrix2i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the transpose of m:" << endl << m.transpose() << endl; -cout << "Here is the coefficient (1,0) in the transpose of m:" << endl - << m.transpose()(1,0) << endl; -cout << "Let us overwrite this coefficient with the value 0." << endl; -m.transpose()(1,0) = 0; -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/MatrixBase_triangularView.cpp b/eigen/doc/snippets/MatrixBase_triangularView.cpp deleted file mode 100644 index 03aa303..0000000 --- a/eigen/doc/snippets/MatrixBase_triangularView.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Matrix3i m = Matrix3i::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the upper-triangular matrix extracted from m:" << endl - << Matrix3i(m.triangularView<Eigen::Upper>()) << endl; -cout << "Here is the strictly-upper-triangular matrix extracted from m:" << endl - << Matrix3i(m.triangularView<Eigen::StrictlyUpper>()) << endl; -cout << "Here is the unit-lower-triangular matrix extracted from m:" << endl - << Matrix3i(m.triangularView<Eigen::UnitLower>()) << endl; -// FIXME need to implement output for triangularViews (Bug 885) diff --git a/eigen/doc/snippets/MatrixBase_zero.cpp b/eigen/doc/snippets/MatrixBase_zero.cpp deleted file mode 100644 index 6064936..0000000 --- a/eigen/doc/snippets/MatrixBase_zero.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << Matrix2d::Zero() << endl; -cout << RowVector4i::Zero() << endl; diff --git a/eigen/doc/snippets/MatrixBase_zero_int.cpp b/eigen/doc/snippets/MatrixBase_zero_int.cpp deleted file mode 100644 index 370a9ba..0000000 --- a/eigen/doc/snippets/MatrixBase_zero_int.cpp +++ /dev/null @@ -1,2 +0,0 @@ -cout << RowVectorXi::Zero(4) << endl; -cout << VectorXf::Zero(2) << endl; diff --git a/eigen/doc/snippets/MatrixBase_zero_int_int.cpp b/eigen/doc/snippets/MatrixBase_zero_int_int.cpp deleted file mode 100644 index 4099c5d..0000000 --- a/eigen/doc/snippets/MatrixBase_zero_int_int.cpp +++ /dev/null @@ -1 +0,0 @@ -cout << MatrixXi::Zero(2,3) << endl; diff --git a/eigen/doc/snippets/Matrix_resize_NoChange_int.cpp b/eigen/doc/snippets/Matrix_resize_NoChange_int.cpp deleted file mode 100644 index acdf18c..0000000 --- a/eigen/doc/snippets/Matrix_resize_NoChange_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd m(3,4); -m.resize(NoChange, 5); -cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl; diff --git a/eigen/doc/snippets/Matrix_resize_int.cpp b/eigen/doc/snippets/Matrix_resize_int.cpp deleted file mode 100644 index 044c789..0000000 --- a/eigen/doc/snippets/Matrix_resize_int.cpp +++ /dev/null @@ -1,6 +0,0 @@ -VectorXd v(10); -v.resize(3); -RowVector3d w; -w.resize(3); // this is legal, but has no effect -cout << "v: " << v.rows() << " rows, " << v.cols() << " cols" << endl; -cout << "w: " << w.rows() << " rows, " << w.cols() << " cols" << endl; diff --git a/eigen/doc/snippets/Matrix_resize_int_NoChange.cpp b/eigen/doc/snippets/Matrix_resize_int_NoChange.cpp deleted file mode 100644 index 5c37c90..0000000 --- a/eigen/doc/snippets/Matrix_resize_int_NoChange.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd m(3,4); -m.resize(5, NoChange); -cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl; diff --git a/eigen/doc/snippets/Matrix_resize_int_int.cpp b/eigen/doc/snippets/Matrix_resize_int_int.cpp deleted file mode 100644 index bfd4741..0000000 --- a/eigen/doc/snippets/Matrix_resize_int_int.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXd m(2,3); -m << 1,2,3,4,5,6; -cout << "here's the 2x3 matrix m:" << endl << m << endl; -cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl; -m.resize(3,2); -cout << "here's the 3x2 matrix m:" << endl << m << endl; -cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl; -m.resize(2,2); -cout << m << endl; diff --git a/eigen/doc/snippets/Matrix_setConstant_int.cpp b/eigen/doc/snippets/Matrix_setConstant_int.cpp deleted file mode 100644 index ff5a86c..0000000 --- a/eigen/doc/snippets/Matrix_setConstant_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -VectorXf v; -v.setConstant(3, 5); -cout << v << endl; diff --git a/eigen/doc/snippets/Matrix_setConstant_int_int.cpp b/eigen/doc/snippets/Matrix_setConstant_int_int.cpp deleted file mode 100644 index 32b950c..0000000 --- a/eigen/doc/snippets/Matrix_setConstant_int_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXf m; -m.setConstant(3, 3, 5); -cout << m << endl; diff --git a/eigen/doc/snippets/Matrix_setIdentity_int_int.cpp b/eigen/doc/snippets/Matrix_setIdentity_int_int.cpp deleted file mode 100644 index a659671..0000000 --- a/eigen/doc/snippets/Matrix_setIdentity_int_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXf m; -m.setIdentity(3, 3); -cout << m << endl; diff --git a/eigen/doc/snippets/Matrix_setOnes_int.cpp b/eigen/doc/snippets/Matrix_setOnes_int.cpp deleted file mode 100644 index 752cb35..0000000 --- a/eigen/doc/snippets/Matrix_setOnes_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -VectorXf v; -v.setOnes(3); -cout << v << endl; diff --git a/eigen/doc/snippets/Matrix_setOnes_int_int.cpp b/eigen/doc/snippets/Matrix_setOnes_int_int.cpp deleted file mode 100644 index 1ffb66b..0000000 --- a/eigen/doc/snippets/Matrix_setOnes_int_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXf m; -m.setOnes(3, 3); -cout << m << endl; diff --git a/eigen/doc/snippets/Matrix_setRandom_int.cpp b/eigen/doc/snippets/Matrix_setRandom_int.cpp deleted file mode 100644 index e160dd7..0000000 --- a/eigen/doc/snippets/Matrix_setRandom_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -VectorXf v; -v.setRandom(3); -cout << v << endl; diff --git a/eigen/doc/snippets/Matrix_setRandom_int_int.cpp b/eigen/doc/snippets/Matrix_setRandom_int_int.cpp deleted file mode 100644 index 80cda11..0000000 --- a/eigen/doc/snippets/Matrix_setRandom_int_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXf m; -m.setRandom(3, 3); -cout << m << endl; diff --git a/eigen/doc/snippets/Matrix_setZero_int.cpp b/eigen/doc/snippets/Matrix_setZero_int.cpp deleted file mode 100644 index 0fb16c1..0000000 --- a/eigen/doc/snippets/Matrix_setZero_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -VectorXf v; -v.setZero(3); -cout << v << endl; diff --git a/eigen/doc/snippets/Matrix_setZero_int_int.cpp b/eigen/doc/snippets/Matrix_setZero_int_int.cpp deleted file mode 100644 index ad883b9..0000000 --- a/eigen/doc/snippets/Matrix_setZero_int_int.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXf m; -m.setZero(3, 3); -cout << m << endl; diff --git a/eigen/doc/snippets/PartialPivLU_solve.cpp b/eigen/doc/snippets/PartialPivLU_solve.cpp deleted file mode 100644 index fa3570a..0000000 --- a/eigen/doc/snippets/PartialPivLU_solve.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXd A = MatrixXd::Random(3,3); -MatrixXd B = MatrixXd::Random(3,2); -cout << "Here is the invertible matrix A:" << endl << A << endl; -cout << "Here is the matrix B:" << endl << B << endl; -MatrixXd X = A.lu().solve(B); -cout << "Here is the (unique) solution X to the equation AX=B:" << endl << X << endl; -cout << "Relative error: " << (A*X-B).norm() / B.norm() << endl; diff --git a/eigen/doc/snippets/PartialRedux_count.cpp b/eigen/doc/snippets/PartialRedux_count.cpp deleted file mode 100644 index 1c3b3a2..0000000 --- a/eigen/doc/snippets/PartialRedux_count.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -Matrix<ptrdiff_t, 3, 1> res = (m.array() >= 0.5).rowwise().count(); -cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl; -cout << res << endl; diff --git a/eigen/doc/snippets/PartialRedux_maxCoeff.cpp b/eigen/doc/snippets/PartialRedux_maxCoeff.cpp deleted file mode 100644 index e8fd382..0000000 --- a/eigen/doc/snippets/PartialRedux_maxCoeff.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl; diff --git a/eigen/doc/snippets/PartialRedux_minCoeff.cpp b/eigen/doc/snippets/PartialRedux_minCoeff.cpp deleted file mode 100644 index d717bc0..0000000 --- a/eigen/doc/snippets/PartialRedux_minCoeff.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl; diff --git a/eigen/doc/snippets/PartialRedux_norm.cpp b/eigen/doc/snippets/PartialRedux_norm.cpp deleted file mode 100644 index dbcf290..0000000 --- a/eigen/doc/snippets/PartialRedux_norm.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl; diff --git a/eigen/doc/snippets/PartialRedux_prod.cpp b/eigen/doc/snippets/PartialRedux_prod.cpp deleted file mode 100644 index aacf09c..0000000 --- a/eigen/doc/snippets/PartialRedux_prod.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the product of each row:" << endl << m.rowwise().prod() << endl; diff --git a/eigen/doc/snippets/PartialRedux_squaredNorm.cpp b/eigen/doc/snippets/PartialRedux_squaredNorm.cpp deleted file mode 100644 index 9f3293e..0000000 --- a/eigen/doc/snippets/PartialRedux_squaredNorm.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the square norm of each row:" << endl << m.rowwise().squaredNorm() << endl; diff --git a/eigen/doc/snippets/PartialRedux_sum.cpp b/eigen/doc/snippets/PartialRedux_sum.cpp deleted file mode 100644 index ec82d3e..0000000 --- a/eigen/doc/snippets/PartialRedux_sum.cpp +++ /dev/null @@ -1,3 +0,0 @@ -Matrix3d m = Matrix3d::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl; diff --git a/eigen/doc/snippets/RealQZ_compute.cpp b/eigen/doc/snippets/RealQZ_compute.cpp deleted file mode 100644 index a18da42..0000000 --- a/eigen/doc/snippets/RealQZ_compute.cpp +++ /dev/null @@ -1,17 +0,0 @@ -MatrixXf A = MatrixXf::Random(4,4); -MatrixXf B = MatrixXf::Random(4,4); -RealQZ<MatrixXf> qz(4); // preallocate space for 4x4 matrices -qz.compute(A,B); // A = Q S Z, B = Q T Z - -// print original matrices and result of decomposition -cout << "A:\n" << A << "\n" << "B:\n" << B << "\n"; -cout << "S:\n" << qz.matrixS() << "\n" << "T:\n" << qz.matrixT() << "\n"; -cout << "Q:\n" << qz.matrixQ() << "\n" << "Z:\n" << qz.matrixZ() << "\n"; - -// verify precision -cout << "\nErrors:" - << "\n|A-QSZ|: " << (A-qz.matrixQ()*qz.matrixS()*qz.matrixZ()).norm() - << ", |B-QTZ|: " << (B-qz.matrixQ()*qz.matrixT()*qz.matrixZ()).norm() - << "\n|QQ* - I|: " << (qz.matrixQ()*qz.matrixQ().adjoint() - MatrixXf::Identity(4,4)).norm() - << ", |ZZ* - I|: " << (qz.matrixZ()*qz.matrixZ().adjoint() - MatrixXf::Identity(4,4)).norm() - << "\n"; diff --git a/eigen/doc/snippets/RealSchur_RealSchur_MatrixType.cpp b/eigen/doc/snippets/RealSchur_RealSchur_MatrixType.cpp deleted file mode 100644 index a5530dc..0000000 --- a/eigen/doc/snippets/RealSchur_RealSchur_MatrixType.cpp +++ /dev/null @@ -1,10 +0,0 @@ -MatrixXd A = MatrixXd::Random(6,6); -cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; - -RealSchur<MatrixXd> schur(A); -cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl; -cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl; - -MatrixXd U = schur.matrixU(); -MatrixXd T = schur.matrixT(); -cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl; diff --git a/eigen/doc/snippets/RealSchur_compute.cpp b/eigen/doc/snippets/RealSchur_compute.cpp deleted file mode 100644 index 20c2611..0000000 --- a/eigen/doc/snippets/RealSchur_compute.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXf A = MatrixXf::Random(4,4); -RealSchur<MatrixXf> schur(4); -schur.compute(A, /* computeU = */ false); -cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl; -schur.compute(A.inverse(), /* computeU = */ false); -cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp deleted file mode 100644 index 73a7f62..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp +++ /dev/null @@ -1,7 +0,0 @@ -SelfAdjointEigenSolver<Matrix4f> es; -Matrix4f X = Matrix4f::Random(4,4); -Matrix4f A = X + X.transpose(); -es.compute(A); -cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + Matrix4f::Identity(4,4)); // re-use es to compute eigenvalues of A+I -cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp deleted file mode 100644 index 3599b17..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp +++ /dev/null @@ -1,17 +0,0 @@ -MatrixXd X = MatrixXd::Random(5,5); -MatrixXd A = X + X.transpose(); -cout << "Here is a random symmetric 5x5 matrix, A:" << endl << A << endl << endl; - -SelfAdjointEigenSolver<MatrixXd> es(A); -cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; -cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl; - -double lambda = es.eigenvalues()[0]; -cout << "Consider the first eigenvalue, lambda = " << lambda << endl; -VectorXd v = es.eigenvectors().col(0); -cout << "If v is the corresponding eigenvector, then lambda * v = " << endl << lambda * v << endl; -cout << "... and A * v = " << endl << A * v << endl << endl; - -MatrixXd D = es.eigenvalues().asDiagonal(); -MatrixXd V = es.eigenvectors(); -cout << "Finally, V * D * V^(-1) = " << endl << V * D * V.inverse() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp deleted file mode 100644 index bbb821e..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp +++ /dev/null @@ -1,16 +0,0 @@ -MatrixXd X = MatrixXd::Random(5,5); -MatrixXd A = X + X.transpose(); -cout << "Here is a random symmetric matrix, A:" << endl << A << endl; -X = MatrixXd::Random(5,5); -MatrixXd B = X * X.transpose(); -cout << "and a random postive-definite matrix, B:" << endl << B << endl << endl; - -GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B); -cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl; -cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl; - -double lambda = es.eigenvalues()[0]; -cout << "Consider the first eigenvalue, lambda = " << lambda << endl; -VectorXd v = es.eigenvectors().col(0); -cout << "If v is the corresponding eigenvector, then A * v = " << endl << A * v << endl; -cout << "... and lambda * B * v = " << endl << lambda * B * v << endl << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp deleted file mode 100644 index 2975cc3..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp +++ /dev/null @@ -1,7 +0,0 @@ -SelfAdjointEigenSolver<MatrixXf> es(4); -MatrixXf X = MatrixXf::Random(4,4); -MatrixXf A = X + X.transpose(); -es.compute(A); -cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + MatrixXf::Identity(4,4)); // re-use es to compute eigenvalues of A+I -cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp deleted file mode 100644 index 07c92a1..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXd X = MatrixXd::Random(5,5); -MatrixXd A = X * X.transpose(); -X = MatrixXd::Random(5,5); -MatrixXd B = X * X.transpose(); - -GeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B,EigenvaluesOnly); -cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl; -es.compute(B,A,false); -cout << "The eigenvalues of the pencil (B,A) are:" << endl << es.eigenvalues() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp deleted file mode 100644 index 0ff33c6..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -SelfAdjointEigenSolver<MatrixXd> es(ones); -cout << "The eigenvalues of the 3x3 matrix of ones are:" - << endl << es.eigenvalues() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp deleted file mode 100644 index cfc8b0d..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -SelfAdjointEigenSolver<MatrixXd> es(ones); -cout << "The first eigenvector of the 3x3 matrix of ones is:" - << endl << es.eigenvectors().col(1) << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp deleted file mode 100644 index 114c65f..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXd X = MatrixXd::Random(4,4); -MatrixXd A = X * X.transpose(); -cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl; - -SelfAdjointEigenSolver<MatrixXd> es(A); -cout << "The inverse square root of A is: " << endl; -cout << es.operatorInverseSqrt() << endl; -cout << "We can also compute it with operatorSqrt() and inverse(). That yields: " << endl; -cout << es.operatorSqrt().inverse() << endl; diff --git a/eigen/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp b/eigen/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp deleted file mode 100644 index eeacca7..0000000 --- a/eigen/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp +++ /dev/null @@ -1,8 +0,0 @@ -MatrixXd X = MatrixXd::Random(4,4); -MatrixXd A = X * X.transpose(); -cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl; - -SelfAdjointEigenSolver<MatrixXd> es(A); -MatrixXd sqrtA = es.operatorSqrt(); -cout << "The square root of A is: " << endl << sqrtA << endl; -cout << "If we square this, we get: " << endl << sqrtA*sqrtA << endl; diff --git a/eigen/doc/snippets/SelfAdjointView_eigenvalues.cpp b/eigen/doc/snippets/SelfAdjointView_eigenvalues.cpp deleted file mode 100644 index be19867..0000000 --- a/eigen/doc/snippets/SelfAdjointView_eigenvalues.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -VectorXd eivals = ones.selfadjointView<Lower>().eigenvalues(); -cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl; diff --git a/eigen/doc/snippets/SelfAdjointView_operatorNorm.cpp b/eigen/doc/snippets/SelfAdjointView_operatorNorm.cpp deleted file mode 100644 index f380f55..0000000 --- a/eigen/doc/snippets/SelfAdjointView_operatorNorm.cpp +++ /dev/null @@ -1,3 +0,0 @@ -MatrixXd ones = MatrixXd::Ones(3,3); -cout << "The operator norm of the 3x3 matrix of ones is " - << ones.selfadjointView<Lower>().operatorNorm() << endl; diff --git a/eigen/doc/snippets/SparseMatrix_coeffs.cpp b/eigen/doc/snippets/SparseMatrix_coeffs.cpp deleted file mode 100644 index f71a69b..0000000 --- a/eigen/doc/snippets/SparseMatrix_coeffs.cpp +++ /dev/null @@ -1,9 +0,0 @@ -SparseMatrix<double> A(3,3); -A.insert(1,2) = 0; -A.insert(0,1) = 1; -A.insert(2,0) = 2; -A.makeCompressed(); -cout << "The matrix A is:" << endl << MatrixXd(A) << endl; -cout << "it has " << A.nonZeros() << " stored non zero coefficients that are: " << A.coeffs().transpose() << endl; -A.coeffs() += 10; -cout << "After adding 10 to every stored non zero coefficient, the matrix A is:" << endl << MatrixXd(A) << endl; diff --git a/eigen/doc/snippets/TopicAliasing_block.cpp b/eigen/doc/snippets/TopicAliasing_block.cpp deleted file mode 100644 index 03282f4..0000000 --- a/eigen/doc/snippets/TopicAliasing_block.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXi mat(3,3); -mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; -cout << "Here is the matrix mat:\n" << mat << endl; - -// This assignment shows the aliasing problem -mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2); -cout << "After the assignment, mat = \n" << mat << endl; diff --git a/eigen/doc/snippets/TopicAliasing_block_correct.cpp b/eigen/doc/snippets/TopicAliasing_block_correct.cpp deleted file mode 100644 index 6fee580..0000000 --- a/eigen/doc/snippets/TopicAliasing_block_correct.cpp +++ /dev/null @@ -1,7 +0,0 @@ -MatrixXi mat(3,3); -mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; -cout << "Here is the matrix mat:\n" << mat << endl; - -// The eval() solves the aliasing problem -mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval(); -cout << "After the assignment, mat = \n" << mat << endl; diff --git a/eigen/doc/snippets/TopicAliasing_cwise.cpp b/eigen/doc/snippets/TopicAliasing_cwise.cpp deleted file mode 100644 index 7049f6c..0000000 --- a/eigen/doc/snippets/TopicAliasing_cwise.cpp +++ /dev/null @@ -1,20 +0,0 @@ -MatrixXf mat(2,2); -mat << 1, 2, 4, 7; -cout << "Here is the matrix mat:\n" << mat << endl << endl; - -mat = 2 * mat; -cout << "After 'mat = 2 * mat', mat = \n" << mat << endl << endl; - - -mat = mat - MatrixXf::Identity(2,2); -cout << "After the subtraction, it becomes\n" << mat << endl << endl; - - -ArrayXXf arr = mat; -arr = arr.square(); -cout << "After squaring, it becomes\n" << arr << endl << endl; - -// Combining all operations in one statement: -mat << 1, 2, 4, 7; -mat = (2 * mat - MatrixXf::Identity(2,2)).array().square(); -cout << "Doing everything at once yields\n" << mat << endl << endl; diff --git a/eigen/doc/snippets/TopicAliasing_mult1.cpp b/eigen/doc/snippets/TopicAliasing_mult1.cpp deleted file mode 100644 index cd7e900..0000000 --- a/eigen/doc/snippets/TopicAliasing_mult1.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXf matA(2,2); -matA << 2, 0, 0, 2; -matA = matA * matA; -cout << matA; diff --git a/eigen/doc/snippets/TopicAliasing_mult2.cpp b/eigen/doc/snippets/TopicAliasing_mult2.cpp deleted file mode 100644 index a3ff568..0000000 --- a/eigen/doc/snippets/TopicAliasing_mult2.cpp +++ /dev/null @@ -1,10 +0,0 @@ -MatrixXf matA(2,2), matB(2,2); -matA << 2, 0, 0, 2; - -// Simple but not quite as efficient -matB = matA * matA; -cout << matB << endl << endl; - -// More complicated but also more efficient -matB.noalias() = matA * matA; -cout << matB; diff --git a/eigen/doc/snippets/TopicAliasing_mult3.cpp b/eigen/doc/snippets/TopicAliasing_mult3.cpp deleted file mode 100644 index 1d12a6c..0000000 --- a/eigen/doc/snippets/TopicAliasing_mult3.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXf matA(2,2); -matA << 2, 0, 0, 2; -matA.noalias() = matA * matA; -cout << matA; diff --git a/eigen/doc/snippets/TopicAliasing_mult4.cpp b/eigen/doc/snippets/TopicAliasing_mult4.cpp deleted file mode 100644 index 8a8992f..0000000 --- a/eigen/doc/snippets/TopicAliasing_mult4.cpp +++ /dev/null @@ -1,5 +0,0 @@ -MatrixXf A(2,2), B(3,2); -B << 2, 0, 0, 3, 1, 1; -A << 2, 0, 0, -2; -A = (B * A).cwiseAbs(); -cout << A;
\ No newline at end of file diff --git a/eigen/doc/snippets/TopicAliasing_mult5.cpp b/eigen/doc/snippets/TopicAliasing_mult5.cpp deleted file mode 100644 index 1a36def..0000000 --- a/eigen/doc/snippets/TopicAliasing_mult5.cpp +++ /dev/null @@ -1,5 +0,0 @@ -MatrixXf A(2,2), B(3,2); -B << 2, 0, 0, 3, 1, 1; -A << 2, 0, 0, -2; -A = (B * A).eval().cwiseAbs(); -cout << A; diff --git a/eigen/doc/snippets/TopicStorageOrders_example.cpp b/eigen/doc/snippets/TopicStorageOrders_example.cpp deleted file mode 100644 index 0623ef0..0000000 --- a/eigen/doc/snippets/TopicStorageOrders_example.cpp +++ /dev/null @@ -1,18 +0,0 @@ -Matrix<int, 3, 4, ColMajor> Acolmajor; -Acolmajor << 8, 2, 2, 9, - 9, 1, 4, 4, - 3, 5, 4, 5; -cout << "The matrix A:" << endl; -cout << Acolmajor << endl << endl; - -cout << "In memory (column-major):" << endl; -for (int i = 0; i < Acolmajor.size(); i++) - cout << *(Acolmajor.data() + i) << " "; -cout << endl << endl; - -Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor; -cout << "In memory (row-major):" << endl; -for (int i = 0; i < Arowmajor.size(); i++) - cout << *(Arowmajor.data() + i) << " "; -cout << endl; - diff --git a/eigen/doc/snippets/Triangular_solve.cpp b/eigen/doc/snippets/Triangular_solve.cpp deleted file mode 100644 index 5484424..0000000 --- a/eigen/doc/snippets/Triangular_solve.cpp +++ /dev/null @@ -1,11 +0,0 @@ -Matrix3d m = Matrix3d::Zero(); -m.triangularView<Eigen::Upper>().setOnes(); -cout << "Here is the matrix m:\n" << m << endl; -Matrix3d n = Matrix3d::Ones(); -n.triangularView<Eigen::Lower>() *= 2; -cout << "Here is the matrix n:\n" << n << endl; -cout << "And now here is m.inverse()*n, taking advantage of the fact that" - " m is upper-triangular:\n" - << m.triangularView<Eigen::Upper>().solve(n) << endl; -cout << "And this is n*m.inverse():\n" - << m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n); diff --git a/eigen/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp b/eigen/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp deleted file mode 100644 index a260124..0000000 --- a/eigen/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp +++ /dev/null @@ -1,9 +0,0 @@ -MatrixXd X = MatrixXd::Random(5,5); -MatrixXd A = X + X.transpose(); -cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl; -Tridiagonalization<MatrixXd> triOfA(A); -MatrixXd Q = triOfA.matrixQ(); -cout << "The orthogonal matrix Q is:" << endl << Q << endl; -MatrixXd T = triOfA.matrixT(); -cout << "The tridiagonal matrix T is:" << endl << T << endl << endl; -cout << "Q * T * Q^T = " << endl << Q * T * Q.transpose() << endl; diff --git a/eigen/doc/snippets/Tridiagonalization_compute.cpp b/eigen/doc/snippets/Tridiagonalization_compute.cpp deleted file mode 100644 index 0062a99..0000000 --- a/eigen/doc/snippets/Tridiagonalization_compute.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Tridiagonalization<MatrixXf> tri; -MatrixXf X = MatrixXf::Random(4,4); -MatrixXf A = X + X.transpose(); -tri.compute(A); -cout << "The matrix T in the tridiagonal decomposition of A is: " << endl; -cout << tri.matrixT() << endl; -tri.compute(2*A); // re-use tri to compute eigenvalues of 2A -cout << "The matrix T in the tridiagonal decomposition of 2A is: " << endl; -cout << tri.matrixT() << endl; diff --git a/eigen/doc/snippets/Tridiagonalization_decomposeInPlace.cpp b/eigen/doc/snippets/Tridiagonalization_decomposeInPlace.cpp deleted file mode 100644 index 93dcfca..0000000 --- a/eigen/doc/snippets/Tridiagonalization_decomposeInPlace.cpp +++ /dev/null @@ -1,10 +0,0 @@ -MatrixXd X = MatrixXd::Random(5,5); -MatrixXd A = X + X.transpose(); -cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl; - -VectorXd diag(5); -VectorXd subdiag(4); -internal::tridiagonalization_inplace(A, diag, subdiag, true); -cout << "The orthogonal matrix Q is:" << endl << A << endl; -cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl; -cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl; diff --git a/eigen/doc/snippets/Tridiagonalization_diagonal.cpp b/eigen/doc/snippets/Tridiagonalization_diagonal.cpp deleted file mode 100644 index 6eec821..0000000 --- a/eigen/doc/snippets/Tridiagonalization_diagonal.cpp +++ /dev/null @@ -1,13 +0,0 @@ -MatrixXcd X = MatrixXcd::Random(4,4); -MatrixXcd A = X + X.adjoint(); -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 << T << endl << endl; - -cout << "We can also extract the diagonals of T directly ..." << endl; -VectorXd diag = triOfA.diagonal(); -cout << "The diagonal is:" << endl << diag << endl; -VectorXd subdiag = triOfA.subDiagonal(); -cout << "The subdiagonal is:" << endl << subdiag << endl; diff --git a/eigen/doc/snippets/Tridiagonalization_householderCoefficients.cpp b/eigen/doc/snippets/Tridiagonalization_householderCoefficients.cpp deleted file mode 100644 index e5d8728..0000000 --- a/eigen/doc/snippets/Tridiagonalization_householderCoefficients.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix4d X = Matrix4d::Random(4,4); -Matrix4d A = X + X.transpose(); -cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl; -Tridiagonalization<Matrix4d> triOfA(A); -Vector3d hc = triOfA.householderCoefficients(); -cout << "The vector of Householder coefficients is:" << endl << hc << endl; diff --git a/eigen/doc/snippets/Tridiagonalization_packedMatrix.cpp b/eigen/doc/snippets/Tridiagonalization_packedMatrix.cpp deleted file mode 100644 index 0f55d0c..0000000 --- a/eigen/doc/snippets/Tridiagonalization_packedMatrix.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix4d X = Matrix4d::Random(4,4); -Matrix4d A = X + X.transpose(); -cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl; -Tridiagonalization<Matrix4d> triOfA(A); -Matrix4d pm = triOfA.packedMatrix(); -cout << "The packed matrix M is:" << endl << pm << endl; -cout << "The diagonal and subdiagonal corresponds to the matrix T, which is:" - << endl << triOfA.matrixT() << endl; diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp deleted file mode 100644 index 96e40ac..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp +++ /dev/null @@ -1,5 +0,0 @@ -MatrixXf matA(2, 2); -matA << 1, 2, 3, 4; -MatrixXf matB(4, 4); -matB << matA, matA/10, matA/10, matA; -std::cout << matB << std::endl; diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp deleted file mode 100644 index 50cff4c..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp +++ /dev/null @@ -1,4 +0,0 @@ -MatrixXf mat = MatrixXf::Random(2, 3); -std::cout << mat << std::endl << std::endl; -mat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat; -std::cout << mat << std::endl; diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Join.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_Join.cpp deleted file mode 100644 index 55a2153..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Join.cpp +++ /dev/null @@ -1,11 +0,0 @@ -RowVectorXd vec1(3); -vec1 << 1, 2, 3; -std::cout << "vec1 = " << vec1 << std::endl; - -RowVectorXd vec2(4); -vec2 << 1, 4, 9, 16; -std::cout << "vec2 = " << vec2 << std::endl; - -RowVectorXd joined(7); -joined << vec1, vec2; -std::cout << "joined = " << joined << std::endl; diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_LinSpaced.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_LinSpaced.cpp deleted file mode 100644 index c6a73ab..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_LinSpaced.cpp +++ /dev/null @@ -1,7 +0,0 @@ -ArrayXXf table(10, 4); -table.col(0) = ArrayXf::LinSpaced(10, 0, 90); -table.col(1) = M_PI / 180 * table.col(0); -table.col(2) = table.col(1).sin(); -table.col(3) = table.col(1).cos(); -std::cout << " Degrees Radians Sine Cosine\n"; -std::cout << table << std::endl; diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp deleted file mode 100644 index cb74576..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp +++ /dev/null @@ -1,20 +0,0 @@ -const int size = 6; -MatrixXd mat1(size, size); -mat1.topLeftCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2); -mat1.topRightCorner(size/2, size/2) = MatrixXd::Identity(size/2, size/2); -mat1.bottomLeftCorner(size/2, size/2) = MatrixXd::Identity(size/2, size/2); -mat1.bottomRightCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2); -std::cout << mat1 << std::endl << std::endl; - -MatrixXd mat2(size, size); -mat2.topLeftCorner(size/2, size/2).setZero(); -mat2.topRightCorner(size/2, size/2).setIdentity(); -mat2.bottomLeftCorner(size/2, size/2).setIdentity(); -mat2.bottomRightCorner(size/2, size/2).setZero(); -std::cout << mat2 << std::endl << std::endl; - -MatrixXd mat3(size, size); -mat3 << MatrixXd::Zero(size/2, size/2), MatrixXd::Identity(size/2, size/2), - MatrixXd::Identity(size/2, size/2), MatrixXd::Zero(size/2, size/2); -std::cout << mat3 << std::endl; - diff --git a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp b/eigen/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp deleted file mode 100644 index 76a36a3..0000000 --- a/eigen/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp +++ /dev/null @@ -1,13 +0,0 @@ -std::cout << "A fixed-size array:\n"; -Array33f a1 = Array33f::Zero(); -std::cout << a1 << "\n\n"; - - -std::cout << "A one-dimensional dynamic-size array:\n"; -ArrayXf a2 = ArrayXf::Zero(3); -std::cout << a2 << "\n\n"; - - -std::cout << "A two-dimensional dynamic-size array:\n"; -ArrayXXf a3 = ArrayXXf::Zero(3, 4); -std::cout << a3 << "\n"; diff --git a/eigen/doc/snippets/Tutorial_Map_rowmajor.cpp b/eigen/doc/snippets/Tutorial_Map_rowmajor.cpp deleted file mode 100644 index fd45ace..0000000 --- a/eigen/doc/snippets/Tutorial_Map_rowmajor.cpp +++ /dev/null @@ -1,7 +0,0 @@ -int array[8]; -for(int i = 0; i < 8; ++i) array[i] = i; -cout << "Column-major:\n" << Map<Matrix<int,2,4> >(array) << endl; -cout << "Row-major:\n" << Map<Matrix<int,2,4,RowMajor> >(array) << endl; -cout << "Row-major using stride:\n" << - Map<Matrix<int,2,4>, Unaligned, Stride<1,4> >(array) << endl; - diff --git a/eigen/doc/snippets/Tutorial_Map_using.cpp b/eigen/doc/snippets/Tutorial_Map_using.cpp deleted file mode 100644 index e5e499f..0000000 --- a/eigen/doc/snippets/Tutorial_Map_using.cpp +++ /dev/null @@ -1,21 +0,0 @@ -typedef Matrix<float,1,Dynamic> MatrixType; -typedef Map<MatrixType> MapType; -typedef Map<const MatrixType> MapTypeConst; // a read-only map -const int n_dims = 5; - -MatrixType m1(n_dims), m2(n_dims); -m1.setRandom(); -m2.setRandom(); -float *p = &m2(0); // get the address storing the data for m2 -MapType m2map(p,m2.size()); // m2map shares data with m2 -MapTypeConst m2mapconst(p,m2.size()); // a read-only accessor for m2 - -cout << "m1: " << m1 << endl; -cout << "m2: " << m2 << endl; -cout << "Squared euclidean distance: " << (m1-m2).squaredNorm() << endl; -cout << "Squared euclidean distance, using map: " << - (m1-m2map).squaredNorm() << endl; -m2map(3) = 7; // this will change m2, since they share the same array -cout << "Updated m2: " << m2 << endl; -cout << "m2 coefficient 2, constant accessor: " << m2mapconst(2) << endl; -/* m2mapconst(2) = 5; */ // this yields a compile-time error diff --git a/eigen/doc/snippets/Tutorial_ReshapeMat2Mat.cpp b/eigen/doc/snippets/Tutorial_ReshapeMat2Mat.cpp deleted file mode 100644 index f84d6e7..0000000 --- a/eigen/doc/snippets/Tutorial_ReshapeMat2Mat.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXf M1(2,6); // Column-major storage -M1 << 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12; - -Map<MatrixXf> M2(M1.data(), 6,2); -cout << "M2:" << endl << M2 << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/Tutorial_ReshapeMat2Vec.cpp b/eigen/doc/snippets/Tutorial_ReshapeMat2Vec.cpp deleted file mode 100644 index 95bd4e0..0000000 --- a/eigen/doc/snippets/Tutorial_ReshapeMat2Vec.cpp +++ /dev/null @@ -1,11 +0,0 @@ -MatrixXf M1(3,3); // Column-major storage -M1 << 1, 2, 3, - 4, 5, 6, - 7, 8, 9; - -Map<RowVectorXf> v1(M1.data(), M1.size()); -cout << "v1:" << endl << v1 << endl; - -Matrix<float,Dynamic,Dynamic,RowMajor> M2(M1); -Map<RowVectorXf> v2(M2.data(), M2.size()); -cout << "v2:" << endl << v2 << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/Tutorial_SlicingCol.cpp b/eigen/doc/snippets/Tutorial_SlicingCol.cpp deleted file mode 100644 index f667ff6..0000000 --- a/eigen/doc/snippets/Tutorial_SlicingCol.cpp +++ /dev/null @@ -1,11 +0,0 @@ -MatrixXf M1 = MatrixXf::Random(3,8); -cout << "Column major input:" << endl << M1 << "\n"; -Map<MatrixXf,0,OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols()+2)/3, OuterStride<>(M1.outerStride()*3)); -cout << "1 column over 3:" << endl << M2 << "\n"; - -typedef Matrix<float,Dynamic,Dynamic,RowMajor> RowMajorMatrixXf; -RowMajorMatrixXf M3(M1); -cout << "Row major input:" << endl << M3 << "\n"; -Map<RowMajorMatrixXf,0,Stride<Dynamic,3> > M4(M3.data(), M3.rows(), (M3.cols()+2)/3, - Stride<Dynamic,3>(M3.outerStride(),3)); -cout << "1 column over 3:" << endl << M4 << "\n";
\ No newline at end of file diff --git a/eigen/doc/snippets/Tutorial_SlicingVec.cpp b/eigen/doc/snippets/Tutorial_SlicingVec.cpp deleted file mode 100644 index 07e10bf..0000000 --- a/eigen/doc/snippets/Tutorial_SlicingVec.cpp +++ /dev/null @@ -1,4 +0,0 @@ -RowVectorXf v = RowVectorXf::LinSpaced(20,0,19); -cout << "Input:" << endl << v << endl; -Map<RowVectorXf,0,InnerStride<2> > v2(v.data(), v.size()/2); -cout << "Even:" << v2 << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/Tutorial_commainit_01.cpp b/eigen/doc/snippets/Tutorial_commainit_01.cpp deleted file mode 100644 index 47ba31d..0000000 --- a/eigen/doc/snippets/Tutorial_commainit_01.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3f m; -m << 1, 2, 3, - 4, 5, 6, - 7, 8, 9; -std::cout << m; diff --git a/eigen/doc/snippets/Tutorial_commainit_01b.cpp b/eigen/doc/snippets/Tutorial_commainit_01b.cpp deleted file mode 100644 index 2adb2e2..0000000 --- a/eigen/doc/snippets/Tutorial_commainit_01b.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix3f m; -m.row(0) << 1, 2, 3; -m.block(1,0,2,2) << 4, 5, 7, 8; -m.col(2).tail(2) << 6, 9; -std::cout << m; diff --git a/eigen/doc/snippets/Tutorial_commainit_02.cpp b/eigen/doc/snippets/Tutorial_commainit_02.cpp deleted file mode 100644 index c960d6a..0000000 --- a/eigen/doc/snippets/Tutorial_commainit_02.cpp +++ /dev/null @@ -1,7 +0,0 @@ -int rows=5, cols=5; -MatrixXf m(rows,cols); -m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(), - MatrixXf::Zero(3,cols-3), - MatrixXf::Zero(rows-3,3), - MatrixXf::Identity(rows-3,cols-3); -cout << m; diff --git a/eigen/doc/snippets/Tutorial_solve_matrix_inverse.cpp b/eigen/doc/snippets/Tutorial_solve_matrix_inverse.cpp deleted file mode 100644 index fff3244..0000000 --- a/eigen/doc/snippets/Tutorial_solve_matrix_inverse.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix3f A; -Vector3f b; -A << 1,2,3, 4,5,6, 7,8,10; -b << 3, 3, 4; -Vector3f x = A.inverse() * b; -cout << "The solution is:" << endl << x << endl; diff --git a/eigen/doc/snippets/Tutorial_solve_multiple_rhs.cpp b/eigen/doc/snippets/Tutorial_solve_multiple_rhs.cpp deleted file mode 100644 index 5411a44..0000000 --- a/eigen/doc/snippets/Tutorial_solve_multiple_rhs.cpp +++ /dev/null @@ -1,10 +0,0 @@ -Matrix3f A(3,3); -A << 1,2,3, 4,5,6, 7,8,10; -Matrix<float,3,2> B; -B << 3,1, 3,1, 4,1; -Matrix<float,3,2> X; -X = A.fullPivLu().solve(B); -cout << "The solution with right-hand side (3,3,4) is:" << endl; -cout << X.col(0) << endl; -cout << "The solution with right-hand side (1,1,1) is:" << endl; -cout << X.col(1) << endl; diff --git a/eigen/doc/snippets/Tutorial_solve_reuse_decomposition.cpp b/eigen/doc/snippets/Tutorial_solve_reuse_decomposition.cpp deleted file mode 100644 index 3ca0645..0000000 --- a/eigen/doc/snippets/Tutorial_solve_reuse_decomposition.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Matrix3f A(3,3); -A << 1,2,3, 4,5,6, 7,8,10; -PartialPivLU<Matrix3f> luOfA(A); // compute LU decomposition of A -Vector3f b; -b << 3,3,4; -Vector3f x; -x = luOfA.solve(b); -cout << "The solution with right-hand side (3,3,4) is:" << endl; -cout << x << endl; -b << 1,1,1; -x = luOfA.solve(b); -cout << "The solution with right-hand side (1,1,1) is:" << endl; -cout << x << endl; diff --git a/eigen/doc/snippets/Tutorial_solve_singular.cpp b/eigen/doc/snippets/Tutorial_solve_singular.cpp deleted file mode 100644 index abff1ef..0000000 --- a/eigen/doc/snippets/Tutorial_solve_singular.cpp +++ /dev/null @@ -1,9 +0,0 @@ -Matrix3f A; -Vector3f b; -A << 1,2,3, 4,5,6, 7,8,9; -b << 3, 3, 4; -cout << "Here is the matrix A:" << endl << A << endl; -cout << "Here is the vector b:" << endl << b << endl; -Vector3f x; -x = A.lu().solve(b); -cout << "The solution is:" << endl << x << endl; diff --git a/eigen/doc/snippets/Tutorial_solve_triangular.cpp b/eigen/doc/snippets/Tutorial_solve_triangular.cpp deleted file mode 100644 index 9d13f22..0000000 --- a/eigen/doc/snippets/Tutorial_solve_triangular.cpp +++ /dev/null @@ -1,8 +0,0 @@ -Matrix3f A; -Vector3f b; -A << 1,2,3, 0,5,6, 0,0,10; -b << 3, 3, 4; -cout << "Here is the matrix A:" << endl << A << endl; -cout << "Here is the vector b:" << endl << b << endl; -Vector3f x = A.triangularView<Upper>().solve(b); -cout << "The solution is:" << endl << x << endl; diff --git a/eigen/doc/snippets/Tutorial_solve_triangular_inplace.cpp b/eigen/doc/snippets/Tutorial_solve_triangular_inplace.cpp deleted file mode 100644 index 16ae633..0000000 --- a/eigen/doc/snippets/Tutorial_solve_triangular_inplace.cpp +++ /dev/null @@ -1,6 +0,0 @@ -Matrix3f A; -Vector3f b; -A << 1,2,3, 0,5,6, 0,0,10; -b << 3, 3, 4; -A.triangularView<Upper>().solveInPlace(b); -cout << "The solution is:" << endl << b << endl; diff --git a/eigen/doc/snippets/VectorwiseOp_homogeneous.cpp b/eigen/doc/snippets/VectorwiseOp_homogeneous.cpp deleted file mode 100644 index aba4fed..0000000 --- a/eigen/doc/snippets/VectorwiseOp_homogeneous.cpp +++ /dev/null @@ -1,7 +0,0 @@ -typedef Matrix<double,3,Dynamic> Matrix3Xd; -Matrix3Xd M = Matrix3Xd::Random(3,5); -Projective3d P(Matrix4d::Random()); -cout << "The matrix M is:" << endl << M << endl << endl; -cout << "M.colwise().homogeneous():" << endl << M.colwise().homogeneous() << endl << endl; -cout << "P * M.colwise().homogeneous():" << endl << P * M.colwise().homogeneous() << endl << endl; -cout << "P * M.colwise().homogeneous().hnormalized(): " << endl << (P * M.colwise().homogeneous()).colwise().hnormalized() << endl << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/Vectorwise_reverse.cpp b/eigen/doc/snippets/Vectorwise_reverse.cpp deleted file mode 100644 index 2f6a350..0000000 --- a/eigen/doc/snippets/Vectorwise_reverse.cpp +++ /dev/null @@ -1,10 +0,0 @@ -MatrixXi m = MatrixXi::Random(3,4); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the rowwise reverse of m:" << endl << m.rowwise().reverse() << endl; -cout << "Here is the colwise reverse of m:" << endl << m.colwise().reverse() << endl; - -cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl -<< m.rowwise().reverse()(1,0) << endl; -cout << "Let us overwrite this coefficient with the value 4." << endl; -//m.colwise().reverse()(1,0) = 4; -cout << "Now the matrix m is:" << endl << m << endl; diff --git a/eigen/doc/snippets/class_FullPivLU.cpp b/eigen/doc/snippets/class_FullPivLU.cpp deleted file mode 100644 index fce7fac..0000000 --- a/eigen/doc/snippets/class_FullPivLU.cpp +++ /dev/null @@ -1,16 +0,0 @@ -typedef Matrix<double, 5, 3> Matrix5x3; -typedef Matrix<double, 5, 5> Matrix5x5; -Matrix5x3 m = Matrix5x3::Random(); -cout << "Here is the matrix m:" << endl << m << endl; -Eigen::FullPivLU<Matrix5x3> lu(m); -cout << "Here is, up to permutations, its LU decomposition matrix:" - << endl << lu.matrixLU() << endl; -cout << "Here is the L part:" << endl; -Matrix5x5 l = Matrix5x5::Identity(); -l.block<5,3>(0,0).triangularView<StrictlyLower>() = lu.matrixLU(); -cout << l << endl; -cout << "Here is the U part:" << endl; -Matrix5x3 u = lu.matrixLU().triangularView<Upper>(); -cout << u << endl; -cout << "Let us now reconstruct the original matrix m:" << endl; -cout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl; diff --git a/eigen/doc/snippets/compile_snippet.cpp.in b/eigen/doc/snippets/compile_snippet.cpp.in deleted file mode 100644 index d63f371..0000000 --- a/eigen/doc/snippets/compile_snippet.cpp.in +++ /dev/null @@ -1,20 +0,0 @@ -static bool eigen_did_assert = false; -#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;} - -#include <iostream> -#include <Eigen/Eigen> - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795 -#endif - - -using namespace Eigen; -using namespace std; - -int main(int, char**) -{ - cout.precision(3); - ${snippet_source_code} - return 0; -} diff --git a/eigen/doc/snippets/tut_arithmetic_redux_minmax.cpp b/eigen/doc/snippets/tut_arithmetic_redux_minmax.cpp deleted file mode 100644 index f4ae7f4..0000000 --- a/eigen/doc/snippets/tut_arithmetic_redux_minmax.cpp +++ /dev/null @@ -1,12 +0,0 @@ - Matrix3f m = Matrix3f::Random(); - std::ptrdiff_t i, j; - float minOfM = m.minCoeff(&i,&j); - cout << "Here is the matrix m:\n" << m << endl; - cout << "Its minimum coefficient (" << minOfM - << ") is at position (" << i << "," << j << ")\n\n"; - - RowVector4i v = RowVector4i::Random(); - int maxOfV = v.maxCoeff(&i); - cout << "Here is the vector v: " << v << endl; - cout << "Its maximum coefficient (" << maxOfV - << ") is at position " << i << endl; diff --git a/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp b/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp deleted file mode 100644 index c8e4746..0000000 --- a/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix2i a; a << 1, 2, 3, 4; -cout << "Here is the matrix a:\n" << a << endl; - -a = a.transpose(); // !!! do NOT do this !!! -cout << "and the result of the aliasing effect:\n" << a << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/tut_arithmetic_transpose_conjugate.cpp b/eigen/doc/snippets/tut_arithmetic_transpose_conjugate.cpp deleted file mode 100644 index 88496b2..0000000 --- a/eigen/doc/snippets/tut_arithmetic_transpose_conjugate.cpp +++ /dev/null @@ -1,12 +0,0 @@ -MatrixXcf a = MatrixXcf::Random(2,2); -cout << "Here is the matrix a\n" << a << endl; - -cout << "Here is the matrix a^T\n" << a.transpose() << endl; - - -cout << "Here is the conjugate of a\n" << a.conjugate() << endl; - - -cout << "Here is the matrix a^*\n" << a.adjoint() << endl; - - diff --git a/eigen/doc/snippets/tut_arithmetic_transpose_inplace.cpp b/eigen/doc/snippets/tut_arithmetic_transpose_inplace.cpp deleted file mode 100644 index 7a069ff..0000000 --- a/eigen/doc/snippets/tut_arithmetic_transpose_inplace.cpp +++ /dev/null @@ -1,6 +0,0 @@ -MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6; -cout << "Here is the initial matrix a:\n" << a << endl; - - -a.transposeInPlace(); -cout << "and after being transposed:\n" << a << endl;
\ No newline at end of file diff --git a/eigen/doc/snippets/tut_matrix_assignment_resizing.cpp b/eigen/doc/snippets/tut_matrix_assignment_resizing.cpp deleted file mode 100644 index cf18998..0000000 --- a/eigen/doc/snippets/tut_matrix_assignment_resizing.cpp +++ /dev/null @@ -1,5 +0,0 @@ -MatrixXf a(2,2); -std::cout << "a is of size " << a.rows() << "x" << a.cols() << std::endl; -MatrixXf b(3,3); -a = b; -std::cout << "a is now of size " << a.rows() << "x" << a.cols() << std::endl; |