RTOp_SubVector Struct Reference
[Public declarations, typedefs and misc functions.]

#include <RTOp.h>

List of all members.

Public Attributes

RTOp_index_type global_offset
RTOp_index_type sub_dim
const RTOp_value_typevalues
ptrdiff_t values_stride


Detailed Description

Struct for a non-mutable sub-vector.

For a sub-vector vec, the corresponding entries in the global vector x(j) (one based) are as follows:

	x( vec.global_offset + k )
		= vec.values[ vec.value_stride * (k-1) ]

	for k = 1,...,vec.sub_dim
  
The stride member vec.value_stride may be positive (>0), negative (<0) or even zero (0). A negative stride vec.value_stride < 0 allows a reverse traversal of the elements in vec.values[]. A zero stride vec.value_stride == 0 allows a vector with all the elements the same.

To avoid making mistakes in setting the members of this struct use one of the helper functions RTOp_sub_vector(), or RTOp_sub_vector_null().

Definition at line 284 of file RTOp.h.


Member Data Documentation

RTOp_index_type RTOp_SubVector::global_offset

Definition at line 286 of file RTOp.h.

RTOp_index_type RTOp_SubVector::sub_dim

Definition at line 288 of file RTOp.h.

const RTOp_value_type* RTOp_SubVector::values

Definition at line 290 of file RTOp.h.

ptrdiff_t RTOp_SubVector::values_stride

Definition at line 292 of file RTOp.h.


The documentation for this struct was generated from the following file:
Generated on Tue Jul 13 09:34:58 2010 for MOOCHO (Single Doxygen Collection) by  doxygen 1.4.7