Public Member Functions | Private Attributes | List of all members
stan::scalar_seq_view< C, T > Class Template Reference

#include "stan/math/prim/scal/meta/scalar_seq_view.hpp"

Public Member Functions

 scalar_seq_view (const C &c)
 
const Toperator[] (int i) const
 
int size () const
 

Private Attributes

const Cc_
 

Detailed Description

template<typename C, typename T = typename scalar_type<C>::type>
class stan::scalar_seq_view< C, T >

scalar_seq_view provides a uniform sequence-like wrapper around either a scalar or a sequence of scalars.

Template Parameters
Cthe container type; will be the scalar type if wrapping a scalar
Tthe scalar type

Definition at line 15 of file scalar_seq_view.hpp.

Constructor & Destructor Documentation

template<typename C, typename T = typename scalar_type<C>::type>
stan::scalar_seq_view< C, T >::scalar_seq_view ( const C c)
inlineexplicit

Member Function Documentation

template<typename C, typename T = typename scalar_type<C>::type>
const T& stan::scalar_seq_view< C, T >::operator[] ( int  i) const
inline

Segfaults if out of bounds.

Parameters
iindex
Returns
the element at the specified position in the container

Definition at line 24 of file scalar_seq_view.hpp.

References stan::scalar_seq_view< C, T >::c_, and MECModelEnuComparisons::i.

template<typename C, typename T = typename scalar_type<C>::type>
int stan::scalar_seq_view< C, T >::size ( void  ) const
inline

Definition at line 26 of file scalar_seq_view.hpp.

References stan::scalar_seq_view< C, T >::c_.

26 { return c_.size(); }

Member Data Documentation

template<typename C, typename T = typename scalar_type<C>::type>
const C& stan::scalar_seq_view< C, T >::c_
private

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