Logo MTL4
Public Member Functions
mtl::Vector< T > Struct Template Reference

Concept Vector. More...

#include <vector.hpp>

Inheritance diagram for mtl::Vector< T >:
Inheritance graph
[legend]
Collaboration diagram for mtl::Vector< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const_reference T::operator() (size_type index) const
 Element access.
const_reference T::operator[] (size_type index) const
 Element access.

Detailed Description

template<typename T>
struct mtl::Vector< T >

Concept Vector.

Refinement of:
Notation:
  • X is a type that models Vector
  • v is an object of type X
  • r are objects of size_type
Valid expressions:
  • Element access:
    v(r)
    Return Type: const_reference
    Semantics: Element in row r and column c
  • Element access:
    v[r]
    Equivalent to v(r)
Invariant:
  • Either num_cols(v), in case of a column vector, or num_rows(v), in case of a row vector, must be 1! Otherwise it would be a matrix.
Models:
  • dense_vector
Note:
  1. If it would become (extremely) important to support 1D C arrays as Vector, it might be necessary to drop the requirement of element access by v(r).

The documentation for this struct was generated from the following file:


mtl::Vector< T > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Gen. with rev. 7542 on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.