* doc improvements in Cwise and PartialRedux:

- 33 new snippets
  - unfuck doxygen output in Cwise (issues with function macros)
  - more see-also links from outside, making Cwise more discoverable
* rename matrixNorm() to operatorNorm(). There are many matrix norms
  (the L2 is another one) but only one is called the operator norm.
  Risk of confusion with keyword operator is not too scary after all.
This commit is contained in:
Benoit Jacob
2008-08-19 04:30:28 +00:00
parent 95dd09bea6
commit 9466e5f94e
43 changed files with 299 additions and 46 deletions

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = Eigen
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 2.0-alpha6
PROJECT_NUMBER = 2.0-alpha7
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -1195,7 +1195,9 @@ PREDEFINED = EIGEN_EMPTY_STRUCT \
EXPAND_AS_DEFINED = EIGEN_MAKE_SCALAR_OPS \
EIGEN_MAKE_TYPEDEFS \
EIGEN_MAKE_TYPEDEFS_ALL_SIZES
EIGEN_MAKE_TYPEDEFS_ALL_SIZES \
EIGEN_CWISE_UNOP_RETURN_TYPE \
EIGEN_CWISE_BINOP_RETURN_TYPE
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone

View File

@@ -0,0 +1,2 @@
Vector3d v(1,-2,-3);
cout << v.cwise().abs() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,-2,-3);
cout << v.cwise().abs2() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(M_PI, M_PI/2, M_PI/3);
cout << v.cwise().cos() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4);
cout << v.cwise().cube() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()==w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3);
cout << v.cwise().exp() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()>w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()>=w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4);
cout << v.cwise().inverse() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()<w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()<=w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3);
cout << v.cwise().log() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4), w(4,2,3);
cout << v.cwise().max(w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4), w(4,2,3);
cout << v.cwise().min(w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3);
cout << v.cwise()-5 << endl;

View File

@@ -0,0 +1,3 @@
Vector3d v(1,2,3);
v.cwise() -= 5;
cout << v << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3), w(3,2,1);
cout << (v.cwise()!=w) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,3);
cout << v.cwise()+5 << endl;

View File

@@ -0,0 +1,3 @@
Vector3d v(1,2,3);
v.cwise() += 5;
cout << v << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(8,27,64);
cout << v.cwise().pow(0.333333) << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4), w(4,2,3);
cout << v.cwise()/w << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(M_PI, M_PI/2, M_PI/3);
cout << v.cwise().sin() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(1,2,4);
cout << v.cwise().sqrt() << endl;

View File

@@ -0,0 +1,2 @@
Vector3d v(2,3,4);
cout << v.cwise().square() << endl;

View File

@@ -0,0 +1,5 @@
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.cwise().abs().colwise().maxCoeff() << endl;

View File

@@ -0,0 +1,4 @@
Vector3d v(1,2,3);
v.cwise() += 3;
v.cwise() -= 2;
cout << v << endl;

View File

@@ -0,0 +1,4 @@
Vector3d v(-1,2,-3);
cout << "the absolute values:" << endl << v.cwise().abs() << endl;
cout << "the absolute values plus one:" << endl << v.cwise().abs().cwise()+1 << endl;
cout << "sum of the squares: " << v.cwise().square().sum() << endl;

View File

@@ -0,0 +1,5 @@
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.cwise().abs().rowwise().maxCoeff() << endl;

View File

@@ -0,0 +1,3 @@
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;

View File

@@ -0,0 +1,3 @@
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;

View File

@@ -0,0 +1,3 @@
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;

View File

@@ -0,0 +1,3 @@
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().norm2() << endl;

View File

@@ -0,0 +1,3 @@
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;