Stan Math Library  2.15.0
reverse mode automatic differentiation
Static Public Member Functions | List of all members
stan::math::promote_elements< std::vector< T >, std::vector< S > > Struct Template Reference

Struct with static function for elementwise type promotion. More...

#include <promote_elements.hpp>

Static Public Member Functions

static std::vector< T > promote (const std::vector< S > &u)
 Return input vector of type S as vector of type T. More...
 

Detailed Description

template<typename T, typename S>
struct stan::math::promote_elements< std::vector< T >, std::vector< S > >

Struct with static function for elementwise type promotion.

This specialization promotes vector elements of different types which must be compatible with promotion.

Template Parameters
Ttype of promoted elements
Stype of input elements, must be assignable to T

Definition at line 21 of file promote_elements.hpp.

Member Function Documentation

§ promote()

template<typename T , typename S >
static std::vector<T> stan::math::promote_elements< std::vector< T >, std::vector< S > >::promote ( const std::vector< S > &  u)
inlinestatic

Return input vector of type S as vector of type T.

Parameters
uvector of type S, assignable to type T
Returns
vector of type T

Definition at line 28 of file promote_elements.hpp.


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

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