Doc: add links and discourage user to write their own expression (better use CwiseNullaryOp)
This commit is contained in:
		
							parent
							
								
									1e2ab8b0b3
								
							
						
					
					
						commit
						e7fbbc2748
					
				| @ -40,6 +40,11 @@ struct traits<CwiseNullaryOp<NullaryOp, PlainObjectType> > : traits<PlainObjectT | |||||||
|   * See DenseBase::NullaryExpr(Index,const CustomNullaryOp&) for an example binding |   * See DenseBase::NullaryExpr(Index,const CustomNullaryOp&) for an example binding | ||||||
|   * C++11 random number generators. |   * C++11 random number generators. | ||||||
|   * |   * | ||||||
|  |   * A nullary expression can also be used to implement custom sophisticated matrix manipulations | ||||||
|  |   * that cannot be covered by the existing set of natively supported matrix manipulations. | ||||||
|  |   * See this \ref TopicCustomizing_NullaryExpr "page" for some examples and additional explanations | ||||||
|  |   * on the behavior of CwiseNullaryOp. | ||||||
|  |   * | ||||||
|   * \sa class CwiseUnaryOp, class CwiseBinaryOp, DenseBase::NullaryExpr |   * \sa class CwiseUnaryOp, class CwiseBinaryOp, DenseBase::NullaryExpr | ||||||
|   */ |   */ | ||||||
| template<typename NullaryOp, typename PlainObjectType> | template<typename NullaryOp, typename PlainObjectType> | ||||||
|  | |||||||
| @ -1,11 +1,12 @@ | |||||||
| namespace Eigen { | namespace Eigen { | ||||||
| 
 | 
 | ||||||
| /** \page TopicCustomizing_NullaryExpr Manipulate matrices through nullary-expression | /** \page TopicCustomizing_NullaryExpr Matrix manipulation via nullary-expressions | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| The main purpose of the class CwiseNullaryOp is to define \em procedural matrices such as constant or random matrices as returned by the Ones(), Zero(), Constant(), Identity() and Random() methods. | The main purpose of the class CwiseNullaryOp is to define \em procedural matrices such as constant or random matrices as returned by the Ones(), Zero(), Constant(), Identity() and Random() methods. | ||||||
| Nevertheless, with some imagination it is possible to accomplish very sophisticated matrix manipulation with minimal efforts such that \ref TopicNewExpressionType "implementing new expression" is rarely needed. | Nevertheless, with some imagination it is possible to accomplish very sophisticated matrix manipulation with minimal efforts such that \ref TopicNewExpressionType "implementing new expression" is rarely needed. | ||||||
| 
 | 
 | ||||||
| \section NullaryExpr_Circulant | \section NullaryExpr_Circulant Example 1: circulant matrix | ||||||
| 
 | 
 | ||||||
| To explore these possibilities let us start with the  \em circulant example of the \ref TopicNewExpressionType "implementing new expression" topic. | To explore these possibilities let us start with the  \em circulant example of the \ref TopicNewExpressionType "implementing new expression" topic. | ||||||
| Let us recall that a circulant matrix is a matrix where each column is the same as the | Let us recall that a circulant matrix is a matrix where each column is the same as the | ||||||
|  | |||||||
| @ -2,6 +2,12 @@ namespace Eigen { | |||||||
| 
 | 
 | ||||||
| /** \page TopicNewExpressionType Adding a new expression type | /** \page TopicNewExpressionType Adding a new expression type | ||||||
| 
 | 
 | ||||||
|  | <!--<span style="font-size:130%; color:red; font-weight: 900;"></span>--> | ||||||
|  | \warning | ||||||
|  | Disclaimer: this page is tailored to very advanced users who are not afraid of dealing with some %Eigen's internal aspects. | ||||||
|  | In most cases, a custom expression can be avoided by either using custom \ref MatrixBase::unaryExpr "unary" or \ref MatrixBase::binaryExpr "binary" functors, | ||||||
|  | while extremely complex matrix manipulations can be achieved by a nullary functors as described in the \ref TopicCustomizing_NullaryExpr "previous page". | ||||||
|  | 
 | ||||||
| This page describes with the help of an example how to implement a new | This page describes with the help of an example how to implement a new | ||||||
| light-weight expression type in %Eigen. This consists of three parts: | light-weight expression type in %Eigen. This consists of three parts: | ||||||
| the expression type itself, a traits class containing compile-time | the expression type itself, a traits class containing compile-time | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Gael Guennebaud
						Gael Guennebaud