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

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

#include <promote_elements.hpp>

Static Public Member Functions

static Eigen::Matrix< T, R, C > promote (const Eigen::Matrix< S, R, C > &u)
 Return input matrix of type S as matrix of type T. More...
 

Detailed Description

template<typename T, typename S, int R, int C>
struct stan::math::promote_elements< Eigen::Matrix< T, R, C >, Eigen::Matrix< S, R, C > >

Struct with static function for elementwise type promotion.

This specialization promotes matrix 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 20 of file promote_elements.hpp.

Member Function Documentation

§ promote()

template<typename T , typename S , int R, int C>
static Eigen::Matrix<T, R, C> stan::math::promote_elements< Eigen::Matrix< T, R, C >, Eigen::Matrix< S, R, C > >::promote ( const Eigen::Matrix< S, R, C > &  u)
inlinestatic

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

Parameters
umatrix of type S, assignable to type T
Returns
matrix of type T

Definition at line 29 of file promote_elements.hpp.


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

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