Stan  1.0
probability, sampling & optimization
Classes | Namespaces | Typedefs | Functions
matrix.hpp File Reference
#include <stan/math/matrix.hpp>
#include <stan/math/matrix_error_handling.hpp>
#include <stan/agrad/special_functions.hpp>

Go to the source code of this file.

Classes

class  stan::agrad::gevv_vvv_vari
 
struct  Eigen::NumTraits< stan::agrad::var >
 Numerical traits template override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::significant_decimals_default_impl< stan::agrad::var, false >
 Implemented this for printing to stream. More...
 
struct  Eigen::internal::scalar_product_traits< stan::agrad::var, double >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::scalar_product_traits< double, stan::agrad::var >
 Scalar product traits override for Eigen for automatic gradient variables. More...
 
struct  Eigen::internal::general_matrix_vector_product< Index, stan::agrad::var, ColMajor, ConjugateLhs, stan::agrad::var, ConjugateRhs >
 Override matrix-vector and matrix-matrix products to use more efficient implementation. More...
 
struct  Eigen::internal::general_matrix_vector_product< Index, stan::agrad::var, RowMajor, ConjugateLhs, stan::agrad::var, ConjugateRhs >
 
struct  Eigen::internal::general_matrix_matrix_product< Index, stan::agrad::var, LhsStorageOrder, ConjugateLhs, stan::agrad::var, RhsStorageOrder, ConjugateRhs, ColMajor >
 
struct  stan::agrad::needs_promotion< LHS, RHS >
 
struct  stan::agrad::assigner< PromoteRHS, LHS, RHS >
 
struct  stan::agrad::assigner< false, LHS, RHS >
 
struct  stan::agrad::assigner< true, LHS, RHS >
 

Namespaces

 stan
 Probability, optimization and sampling library.
 
 stan::agrad
 Function gradients via reverse-mode automatic differentiation.
 
 Eigen
 (Expert) Numerical traits for algorithmic differentiation variables.
 
 Eigen::internal
 (Expert) Product traits for algorithmic differentiation variables.
 

Typedefs

typedef Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > stan::agrad::matrix_v
 The type of a matrix holding stan::agrad::var values. More...
 
typedef Eigen::Matrix< var, Eigen::Dynamic, 1 > stan::agrad::vector_v
 The type of a (column) vector holding stan::agrad::var values. More...
 
typedef Eigen::Matrix< var, 1, Eigen::Dynamic > stan::agrad::row_vector_v
 The type of a row vector holding stan::agrad::var values. More...
 

Functions

void stan::agrad::initialize_variable (var &variable, const var &value)
 Initialize variable to value. More...
 
template<int R, int C>
void stan::agrad::initialize_variable (Eigen::Matrix< var, R, C > &matrix, const var &value)
 Initialize every cell in the matrix to the specified value. More...
 
template<typename T >
void stan::agrad::initialize_variable (std::vector< T > &variables, const var &value)
 Initialize the variables in the standard vector recursively. More...
 
var stan::agrad::to_var (const double &x)
 Converts argument to an automatic differentiation variable. More...
 
var stan::agrad::to_var (const var &x)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v stan::agrad::to_var (const stan::math::matrix_d &m)
 Converts argument to an automatic differentiation variable. More...
 
matrix_v stan::agrad::to_var (const matrix_v &m)
 Converts argument to an automatic differentiation variable. More...
 
vector_v stan::agrad::to_var (const stan::math::vector_d &v)
 Converts argument to an automatic differentiation variable. More...
 
vector_v stan::agrad::to_var (const vector_v &v)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v stan::agrad::to_var (const stan::math::row_vector_d &rv)
 Converts argument to an automatic differentiation variable. More...
 
row_vector_v stan::agrad::to_var (const row_vector_v &rv)
 Converts argument to an automatic differentiation variable. More...
 
template<int R, int C>
var stan::agrad::dot_self (const Eigen::Matrix< var, R, C > &v)
 Returns the dot product of a vector with itself. More...
 
template<int R1, int C1, int R2, int C2>
var stan::agrad::dot_product (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 Returns the dot product. More...
 
template<int R1, int C1, int R2, int C2>
var stan::agrad::dot_product (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
 Returns the dot product. More...
 
template<int R1, int C1, int R2, int C2>
var stan::agrad::dot_product (const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const var *v1, const var *v2, size_t length)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const var *v1, const double *v2, size_t length)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const double *v1, const var *v2, size_t length)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const std::vector< var > &v1, const std::vector< var > &v2)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const std::vector< var > &v1, const std::vector< double > &v2)
 Returns the dot product. More...
 
var stan::agrad::dot_product (const std::vector< double > &v1, const std::vector< var > &v2)
 Returns the dot product. More...
 
template<int R, int C>
var stan::agrad::sum (const Eigen::Matrix< var, R, C > &m)
 Returns the sum of the coefficients of the specified matrix, column vector or row vector. More...
 
double stan::agrad::divide (double x, double y)
 Return the division of the first scalar by the second scalar. More...
 
template<typename T1 , typename T2 >
var stan::agrad::divide (const T1 &v, const T2 &c)
 
template<typename T1 , typename T2 , int R, int C>
Eigen::Matrix< var, R, C > stan::agrad::divide (const Eigen::Matrix< T1, R, C > &v, const T2 &c)
 Return the division of the specified column vector by the specified scalar. More...
 
template<typename T1 , typename T2 >
boost::math::tools::promote_args< T1, T2 >::type stan::agrad::multiply (const T1 &v, const T2 &c)
 Return the product of two scalars. More...
 
template<typename T1 , typename T2 , int R2, int C2>
Eigen::Matrix< var, R2, C2 > stan::agrad::multiply (const T1 &c, const Eigen::Matrix< T2, R2, C2 > &m)
 Return the product of scalar and matrix. More...
 
template<typename T1 , int R1, int C1, typename T2 >
Eigen::Matrix< var, R1, C1 > stan::agrad::multiply (const Eigen::Matrix< T1, R1, C1 > &m, const T2 &c)
 Return the product of scalar and matrix. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::agrad::multiply (const Eigen::Matrix< var, R1, C1 > &m1, const Eigen::Matrix< var, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::agrad::multiply (const Eigen::Matrix< double, R1, C1 > &m1, const Eigen::Matrix< var, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<int R1, int C1, int R2, int C2>
Eigen::Matrix< var, R1, C2 > stan::agrad::multiply (const Eigen::Matrix< var, R1, C1 > &m1, const Eigen::Matrix< double, R2, C2 > &m2)
 Return the product of the specified matrices. More...
 
template<int C1, int R2>
var stan::agrad::multiply (const Eigen::Matrix< var, 1, C1 > &rv, const Eigen::Matrix< var, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
template<int C1, int R2>
var stan::agrad::multiply (const Eigen::Matrix< double, 1, C1 > &rv, const Eigen::Matrix< var, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
template<int C1, int R2>
var stan::agrad::multiply (const Eigen::Matrix< var, 1, C1 > &rv, const Eigen::Matrix< double, R2, 1 > &v)
 Return the scalar product of the specified row vector and specified column vector. More...
 
matrix_v stan::agrad::multiply_lower_tri_self_transpose (const matrix_v &L)
 
matrix_v stan::agrad::tcrossprod (const matrix_v &M)
 Returns the result of post-multiplying a matrix by its own transpose. More...
 
matrix_v stan::agrad::crossprod (const matrix_v &M)
 Returns the result of pre-multiplying a matrix by its own transpose. More...
 
void stan::agrad::assign_to_var (stan::agrad::var &var, const double &val)
 
void stan::agrad::assign_to_var (stan::agrad::var &var, const stan::agrad::var &val)
 
void stan::agrad::assign_to_var (int &n_lhs, const int &n_rhs)
 
void stan::agrad::assign_to_var (double &n_lhs, const double &n_rhs)
 
template<typename LHS , typename RHS >
void stan::agrad::assign_to_var (std::vector< LHS > &x, const std::vector< RHS > &y)
 
template<typename LHS , typename RHS >
void stan::agrad::assign_to_var (Eigen::Matrix< LHS, Eigen::Dynamic, 1 > &x, const Eigen::Matrix< RHS, Eigen::Dynamic, 1 > &y)
 
template<typename LHS , typename RHS >
void stan::agrad::assign_to_var (Eigen::Matrix< LHS, 1, Eigen::Dynamic > &x, const Eigen::Matrix< RHS, 1, Eigen::Dynamic > &y)
 
template<typename LHS , typename RHS >
void stan::agrad::assign_to_var (Eigen::Matrix< LHS, Eigen::Dynamic, Eigen::Dynamic > &x, const Eigen::Matrix< RHS, Eigen::Dynamic, Eigen::Dynamic > &y)
 
template<typename LHS , typename RHS >
void stan::agrad::assign (LHS &var, const RHS &val)
 
void stan::agrad::stan_print (std::ostream *o, const var &x)
 

Variable Documentation

◆ length_

size_t length_
protected

Definition at line 450 of file matrix.hpp.

◆ size_

size_t size_
protected

Definition at line 413 of file matrix.hpp.

◆ v1_

vari** v1_
protected

Definition at line 493 of file matrix.hpp.

◆ v2_

double* v2_
protected

Definition at line 494 of file matrix.hpp.

◆ v_

vari** v_
protected

Definition at line 412 of file matrix.hpp.


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