| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
stan::VectorViewMvt< T, is_array, throw_if_accessed > Class Template Reference

VectorViewMvt is a template expression that wraps either an Eigen::Matrix or a std::vector<Eigen::Matrix> and allows the template expression to be used as an array using `operator[]`. More...

`#include <VectorViewMvt.hpp>`

## Public Types
typedef scalar_type_pre< T >::type | matrix_t

## Public Member Functions
| VectorViewMvt (matrix_t &m)
| Constructor. More...
| VectorViewMvt (std::vector< matrix_t > &vm)
| Constructor. More...
matrix_t & | operator[] (int i)
| Allows the structure to be accessed like an array. More...

## Detailed Description

### template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>
class stan::VectorViewMvt< T, is_array, throw_if_accessed >

VectorViewMvt is a template expression that wraps either an Eigen::Matrix or a std::vector<Eigen::Matrix> and allows the template expression to be used as an array using `operator[]`.

Template Parameters

  T | Type of scalar of the matrix being wrapped.
  is_array | True if underlying type T can be indexed with operator[].
  throw_if_accessed | True if the behavior is to throw an exception whenever `operator[]` is called.

Definition at line 29 of file VectorViewMvt.hpp.

## Member Typedef Documentation

template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>

typedef scalar_type_pre<T>::type stan::VectorViewMvt< T, is_array, throw_if_accessed >::matrix_t

Definition at line 31 of file VectorViewMvt.hpp.

## Constructor & Destructor Documentation

template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>

stan::VectorViewMvt< T, is_array, throw_if_accessed >::VectorViewMvt | ( | matrix_t & | m | ) |
| inline explicit

Constructor.

Definition at line 36 of file VectorViewMvt.hpp.

template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>

stan::VectorViewMvt< T, is_array, throw_if_accessed >::VectorViewMvt | ( | std::vector< matrix_t > & | vm | ) |
| inline explicit

Constructor.

Definition at line 41 of file VectorViewMvt.hpp.

## Member Function Documentation

template<typename T, bool is_array = stan::is_vector_like <typename stan::math::value_type<T>::type>::value, bool throw_if_accessed = false>

matrix_t& stan::VectorViewMvt< T, is_array, throw_if_accessed >::operator[] | ( | int | i | ) |
| inline

Allows the structure to be accessed like an array.

If is_array is false, this will return the matrix it was constructed with. If is_array is true, This does not check bounds and will likely segfault if the index is out of range.

Parameters

  i | index. Only used if access is true.

Returns
  Reference to a matrix.

Exceptions

  std::out_of_range | if the template parameter, throw_if_accessed, is true.

Definition at line 54 of file VectorViewMvt.hpp.

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

- stan/math/prim/mat/meta/VectorViewMvt.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.