Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > > Class Template Reference

#include "stan/math/rev/mat/meta/operands_and_partials.hpp"

Public Types

typedef std::vector< Eigen::Matrix< var, R, C > > Op
 
typedef Eigen::Matrix< double,-1,-1 > partial_t
 

Public Member Functions

 ops_partials_edge (const Op &ops)
 

Public Attributes

std::vector< partial_tpartials_vec_
 

Private Member Functions

void dump_partials (double *partials)
 
void dump_operands (vari **varis)
 
int size ()
 

Private Attributes

const Opoperands_
 

Friends

template<typename , typename , typename , typename , typename , typename >
class stan::math::operands_and_partials
 

Detailed Description

template<int R, int C>
class stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >

Definition at line 78 of file operands_and_partials.hpp.

Member Typedef Documentation

template<int R, int C>
typedef std::vector<Eigen::Matrix<var, R, C> > stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::Op

Definition at line 80 of file operands_and_partials.hpp.

template<int R, int C>
typedef Eigen::Matrix<double, -1, -1> stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::partial_t

Definition at line 81 of file operands_and_partials.hpp.

Constructor & Destructor Documentation

template<int R, int C>
stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::ops_partials_edge ( const Op ops)
inlineexplicit

Definition at line 83 of file operands_and_partials.hpp.

References stan::math::cols(), MECModelEnuComparisons::i, stan::math::rows(), and Zero().

84  : partials_vec_(ops.size()), operands_(ops) {
85  for (size_t i = 0; i < ops.size(); ++i) {
86  partials_vec_[i] = partial_t::Zero(ops[i].rows(), ops[i].cols());
87  }
88  }
int rows(const Eigen::Matrix< T, R, C > &m)
Definition: rows.hpp:20
int cols(const Eigen::Matrix< T, R, C > &m)
Definition: cols.hpp:20
void Zero()

Member Function Documentation

template<int R, int C>
void stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::dump_operands ( vari **  varis)
inlineprivate

Definition at line 103 of file operands_and_partials.hpp.

References MECModelEnuComparisons::i, and calib::j.

103  {
104  int p_i = 0;
105  for (size_t i = 0; i < this->operands_.size(); ++i) {
106  for (int j = 0; j < this->operands_[i].size(); ++j, ++p_i) {
107  varis[p_i] = this->operands_[i](j).vi_;
108  }
109  }
110  }
const double j
Definition: BetheBloch.cxx:29
template<int R, int C>
void stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::dump_partials ( double *  partials)
inlineprivate

Definition at line 95 of file operands_and_partials.hpp.

References MECModelEnuComparisons::i, and calib::j.

95  {
96  int p_i = 0;
97  for (size_t i = 0; i < this->partials_vec_.size(); ++i) {
98  for (int j = 0; j < this->partials_vec_[i].size(); ++j, ++p_i) {
99  partials[p_i] = this->partials_vec_[i](j);
100  }
101  }
102  }
const double j
Definition: BetheBloch.cxx:29
template<int R, int C>
int stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::size ( void  )
inlineprivate

Definition at line 111 of file operands_and_partials.hpp.

References unlikely.

111  {
112  if (unlikely(this->operands_.size() == 0))
113  return 0;
114  return this->operands_.size() * this->operands_[0].size();
115  }
#define unlikely(expr)
Definition: lz4.cxx:121

Friends And Related Function Documentation

template<int R, int C>
template<typename , typename , typename , typename , typename , typename >
friend class stan::math::operands_and_partials
friend

Definition at line 92 of file operands_and_partials.hpp.

Member Data Documentation

template<int R, int C>
const Op& stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::operands_
private

Definition at line 93 of file operands_and_partials.hpp.

template<int R, int C>
std::vector<partial_t> stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::partials_vec_

Definition at line 82 of file operands_and_partials.hpp.


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