From 425444428c366a09cbc7608c89deac7bcf8da621 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Fri, 23 Jul 2010 22:20:00 +0100 Subject: Add examples for API documentation of block methods in DenseBase. --- doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_bottomRows_int.cpp | 6 ++++++ doc/snippets/MatrixBase_leftCols_int.cpp | 6 ++++++ doc/snippets/MatrixBase_rightCols_int.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_bottomRows.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_leftCols.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_rightCols.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_topRows.cpp | 6 ++++++ doc/snippets/MatrixBase_topLeftCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_topRightCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_topRows_int.cpp | 6 ++++++ 16 files changed, 96 insertions(+) create mode 100644 doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_bottomRows_int.cpp create mode 100644 doc/snippets/MatrixBase_leftCols_int.cpp create mode 100644 doc/snippets/MatrixBase_rightCols_int.cpp create mode 100644 doc/snippets/MatrixBase_template_int_bottomRows.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp create mode 100644 doc/snippets/MatrixBase_template_int_leftCols.cpp create mode 100644 doc/snippets/MatrixBase_template_int_rightCols.cpp create mode 100644 doc/snippets/MatrixBase_template_int_topRows.cpp create mode 100644 doc/snippets/MatrixBase_topLeftCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_topRightCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_topRows_int.cpp (limited to 'doc/snippets') diff --git a/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp new file mode 100644 index 000000000..ebae95e1d --- /dev/null +++ b/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp b/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp new file mode 100644 index 000000000..bf05093af --- /dev/null +++ b/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_bottomRows_int.cpp b/doc/snippets/MatrixBase_bottomRows_int.cpp new file mode 100644 index 000000000..47ca92ec3 --- /dev/null +++ b/doc/snippets/MatrixBase_bottomRows_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_leftCols_int.cpp b/doc/snippets/MatrixBase_leftCols_int.cpp new file mode 100644 index 000000000..6ea984e4e --- /dev/null +++ b/doc/snippets/MatrixBase_leftCols_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_rightCols_int.cpp b/doc/snippets/MatrixBase_rightCols_int.cpp new file mode 100644 index 000000000..cb513401b --- /dev/null +++ b/doc/snippets/MatrixBase_rightCols_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_bottomRows.cpp b/doc/snippets/MatrixBase_template_int_bottomRows.cpp new file mode 100644 index 000000000..f9ea892da --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_bottomRows.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp new file mode 100644 index 000000000..847892a27 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp new file mode 100644 index 000000000..abacb014e --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp new file mode 100644 index 000000000..1899d902d --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp b/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp new file mode 100644 index 000000000..c3a177110 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_leftCols.cpp b/doc/snippets/MatrixBase_template_int_leftCols.cpp new file mode 100644 index 000000000..1c425d917 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_leftCols.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_rightCols.cpp b/doc/snippets/MatrixBase_template_int_rightCols.cpp new file mode 100644 index 000000000..fc8c0d93c --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_rightCols.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_template_int_topRows.cpp b/doc/snippets/MatrixBase_template_int_topRows.cpp new file mode 100644 index 000000000..0110251a5 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_topRows.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp new file mode 100644 index 000000000..e52cb3bdb --- /dev/null +++ b/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_topRightCorner_int_int.cpp b/doc/snippets/MatrixBase_topRightCorner_int_int.cpp new file mode 100644 index 000000000..811fa563e --- /dev/null +++ b/doc/snippets/MatrixBase_topRightCorner_int_int.cpp @@ -0,0 +1,6 @@ +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/doc/snippets/MatrixBase_topRows_int.cpp b/doc/snippets/MatrixBase_topRows_int.cpp new file mode 100644 index 000000000..f2d75f1cb --- /dev/null +++ b/doc/snippets/MatrixBase_topRows_int.cpp @@ -0,0 +1,6 @@ +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; -- cgit v1.2.3