Vector of double precision numbers. More...
#include <dvector.h>
Public Member Functions | |
dvector (const predvector &pd) | |
Creates a dvector from an instance of class predvector. | |
dvector (const dvar_vector_position &dvp, const kkludge_object &) | |
Construct a dvector object from a dvar_vector_position object. | |
dvector (const ad_integer &, const index_type &) | |
Description not yet available. | |
dvector (void) | |
Construct a dvector without allocating memory. | |
dvector (const dvector &) | |
Copy constructor. | |
dvector (const ivector &) | |
Description not yet available. | |
dvector (const lvector &) | |
Description not yet available. | |
dvector (const char *) | |
Description not yet available. | |
dvector (int ncl, int ncu) | |
Construct a dvector with specified range of valid subscript. | |
dvector (unsigned int sz, double *x) | |
Construct a dvector object from a C style array of doubles. | |
dvector (char *filename, const int &column) | |
Construct dvector using matrix input from text filename. | |
~dvector () | |
Default destructor. | |
const double * | address () const |
void | allocate (int ncl, int ncu) |
Allocate memory for a dvector. | |
void | allocate (const dvector &dv) |
Allocate memory for a dvector the same size as it's argument. | |
void | allocate (const dvar_vector &) |
Allocate memory for a dvector the same size as it's argument. | |
void | allocate (const char *) |
Description not yet available. | |
void | allocate (void) |
Allocate dvector without allocating memory. | |
void | allocate (const ad_integer &, const index_type &) |
Description not yet available. | |
void | allocatec (const dvector &dv) |
Make shallow copy of dvector shape. | |
int | allocated (void) const |
Returns 1 (TRUE) if memory is allocated. | |
void | deallocate (void) |
Called by destructor to deallocate memory for a dvector object. | |
double & | elem (int i) |
const double & | elem (int i) const |
void | fill (const char *s) |
Fill vectors from values in string s. | |
void | fill_multinomial (const int &seed, const dvector &p) |
Description not yet available. | |
void | fill_multinomial (const random_number_generator &rng, const dvector &p) |
Description not yet available. | |
void | fill_randbi (long int &n, double) |
Description not yet available. | |
void | fill_randbi (double p, const random_number_generator &rng) |
Description not yet available. | |
void | fill_randbi_ni (long int &n, double) |
Description not yet available. | |
void | fill_randcau (const random_number_generator &rng) |
Description not yet available. | |
void | fill_randn (long int &n) |
Description not yet available. | |
void | fill_randn (const random_number_generator &rng) |
Description not yet available. | |
void | fill_randn_ni (long int &n) |
Description not yet available. | |
void | fill_randnegbinomial (double lambda, double tau, const random_number_generator &rng) |
Description not yet available. | |
void | fill_randpoisson (double lambda, const random_number_generator &rng) |
Fill vector with Poisson pseudorandom numbers. | |
void | fill_randu (long int &n) |
Description not yet available. | |
void | fill_randu (const random_number_generator &rng) |
Description not yet available. | |
void | fill_randu_ni (long int &n) |
Description not yet available. | |
void | fill_seqadd (double, double) |
Description not yet available. | |
unsigned int | get_ncopies () const |
double *& | get_v (void) |
double * | get_v (void) const |
int | indexmax () const |
Get maximum valid index. | |
int | indexmin () const |
Get minimum valid index. | |
void | initialize (void) |
Sets all elements to zero. | |
double * | initpointer (void) |
const double * | initpointer (void) const |
bool | is_valid_index (const int i) const |
Check index i is in dvector bounds [index_min, index_max]. | |
int | operator! (void) const |
Returns 1 (TRUE) if memory is NOT allocated. | |
dvector | operator() (int lb, int ub) |
Get subvector. | |
dvector | operator() (const lvector &) |
Description not yet available. | |
dvector | operator() (const ivector &u) |
Description not yet available. | |
double & | operator() (int i) |
const double & | operator() (int i) const |
dvector & | operator*= (double v1) |
Multiply elements of a vector by a constant. | |
dvector & | operator++ (void) |
Increment vector indices array pointer. | |
dvector & | operator+= (const dvector &v1) |
Description not yet available. | |
dvector & | operator+= (double v1) |
Description not yet available. | |
dvector | operator- () |
Description not yet available. | |
dvector & | operator-- (void) |
Decrement vector indices array pointer. | |
dvector & | operator-= (const dvector &v1) |
Description not yet available. | |
dvector & | operator-= (double v1) |
Description not yet available. | |
dvector & | operator/= (double v1) |
Divide elements of a vector by a constant. | |
dvector & | operator= (const dvector &t) |
Assignment operator for dvector argument. | |
dvector & | operator= (double x) |
Assignment operator for double argument. | |
double & | operator[] (int i) |
const double & | operator[] (int i) const |
void | read_from (const uistream &) |
Description not yet available. | |
void | read_from (const istream &) |
Description not yet available. | |
void | reallocate (double size) |
Reallocate size of array. | |
void | safe_allocate (int, int) |
Safely allocate memory for a dvector. | |
void | safe_deallocate (void) |
Safely deallocates memory by reporting if shallow copies are still in scope. | |
void | save_dvector_derivatives (const dvar_vector_position &pos) const |
Puts the derivative values in a dvector into a dvar_vector's guts. | |
void | save_dvector_derivatives (void) const |
void | save_dvector_derivatives_na (const dvar_vector_position &pos) const |
Description not yet available. | |
void | save_dvector_position (void) const |
Description not yet available. | |
void | save_dvector_value (void) const |
Saves the size, address, and value information for a dvector. | |
void | shallow_copy (const dvector &) |
Explicit shallow copy. | |
dvector & | shift (int min) |
Shift valid range of subscripts. | |
int | size () const |
Get number of elements in array. | |
dvector | sub (int lb, int ub) |
Get subvector. | |
int & | testmax () |
int & | testmin () |
void | write_on (const ostream &) const |
Description not yet available. | |
void | write_on (const uostream &) const |
Description not yet available. | |
Protected Attributes | |
int | index_max |
maximum valid subscript | |
int | index_min |
minimum valid subscript | |
vector_shapex * | shape |
pointer to vector "shape" | |
double * | v |
pointer to the data | |
Friends | |
class | banded_lower_triangular_dmatrix |
class | banded_lower_triangular_dvar_matrix |
class | banded_symmetric_dmatrix |
class | banded_symmetric_dvar_matrix |
class | d3_array |
class | dmatrix |
class | dvar_vector |
dvector | elem_div (const dvector &, const dvector &) |
Element-wise division of two vectors; constant objects. | |
dvar_vector | elem_div (const dvector &, const dvar_vector &) |
Description not yet available. | |
dvar_vector | elem_div (const dvar_vector &, const dvector &) |
Description not yet available. | |
dvector | elem_prod (const dvector &, const dvector &) |
Element-wise multiplication of two vectors; constant objects. | |
dvar_vector | elem_prod (const dvector &, const dvar_vector &) |
Description not yet available. | |
dvar_vector | elem_prod (const dvar_vector &, const dvector &) |
Description not yet available. | |
dvector | exp (const dvector &) |
Description not yet available. | |
dvector | fabs (const dvector &) |
Description not yet available. | |
char * | fform (const char *, const dvector &) |
dvector | first_difference (const dvector &) |
Description not yet available. | |
dvector | log (const dvector &) |
Description not yet available. | |
double | max (const dvector &) |
Description not yet available. | |
double | min (const dvector &) |
Description not yet available. | |
double | norm (const dvector &) |
Norm of a vector; constant objects. | |
double | norm2 (const dvector &) |
Squared norm of a vector; constant objects. | |
double | operator* (const dvector &, const dvector &) |
Compute the dot product of two vectors. | |
dvariable | operator* (const dvector &, const dvar_vector &) |
Description not yet available. | |
dvariable | operator* (const dvar_vector &, const dvector &) |
Description not yet available. | |
dvar_vector | operator* (const prevariable &, const dvector &) |
Description not yet available. | |
dvector | operator* (double, const dvector &) |
Multiply a dvector by a constant. | |
dvector | operator* (const dvector &x, const dmatrix &m) |
Description not yet available. | |
dvector | operator* (const dmatrix &x, const dvector &m) |
Description not yet available. | |
dvar_vector | operator* (const dvector &x, const dvar_matrix &m) |
Description not yet available. | |
dvar_vector | operator* (const dvar_matrix &x, const dvector &m) |
Description not yet available. | |
dvector | operator+ (const dvector &, const dvector &) |
Add two dvectors. | |
dvar_vector | operator+ (const dvar_vector &, const dvector &) |
Description not yet available. | |
dvar_vector | operator+ (const dvector &, const dvar_vector &) |
Description not yet available. | |
dvector | operator- (const dvector &, const dvector &) |
Subtract two dvectors. | |
dvar_vector | operator- (const dvar_vector &, const dvector &) |
Description not yet available. | |
dvar_vector | operator- (const dvector &, const dvar_vector &) |
Description not yet available. | |
class | sdmatrix |
dvector | second_difference (const dvector &) |
double | sumsq (const dvector &) |
Vector of double precision numbers.
A basic container class for a one dimensional array of double precision floating point numbers. Fundamental building block for higher dimensional arrays. All ADMB vector classes have similar functionality.
dvector::dvector | ( | const predvector & | pdv | ) |
Creates a dvector from an instance of class predvector.
Creates a shallow copy.
pdv | an instance of class predvector. Updated by Martell, March 10, 2014, from Dave's email |
Definition at line 197 of file dvector.cpp.
dvector::dvector | ( | const dvar_vector_position & | dvp, |
const kkludge_object & | kk | ||
) |
Construct a dvector object from a dvar_vector_position object.
Used in writing adjoint functions callled by the autodif library,
dvp | Reference to a dvar_vector_position object (usually read from stack) |
kk | Kludge to avoid ambiguous function references |
Definition at line 362 of file dvector.cpp.
dvector::dvector | ( | const ad_integer & | ncl, |
const index_type & | nch | ||
) |
dvector::dvector | ( | void | ) |
Construct a dvector without allocating memory.
Useful in creating classes containing dvectors.
Definition at line 384 of file dvector.cpp.
Referenced by data_vector::allocate().
dvector::dvector | ( | const dvector & | t | ) |
Copy constructor.
This constructor make a "shallow" copy. Values of existing pointers are copied, and no memory is allocated. Invoked by the compiler in some circumstances such as function call containing an argument of class dvector passed by value.
The following code segments creates the dvector
object x
and fills it with uniform random numbers (using the constant 79 as seed; fill_randu). The new dvector
object y
will reference the same memory locations as x
, and any change s in y
will also appear in x
. The new dvector
object z
does not refer to the same memory locations as x
, and any changes in z
will be unique to z
.
Definition at line 149 of file dvector.cpp.
dvector::dvector | ( | const ivector & | u | ) |
dvector::dvector | ( | const lvector & | u | ) |
dvector::dvector | ( | const char * | s | ) |
dvector::dvector | ( | int | ncl, |
int | nch | ||
) |
Construct a dvector with specified range of valid subscript.
ncl | Integer specifying lowest valid subscript. |
nch | Integer specifying highest valid subscript. |
Definition at line 372 of file dvector.cpp.
dvector::dvector | ( | unsigned int | sz, |
double * | x | ||
) |
Construct a dvector object from a C style array of doubles.
sz | Number of valid memory locations allocated in the array The range of valid subscripts for the dvector object will be [0,sz-1]. |
x | Pointer to double pointing to the first element in the array. |
Definition at line 335 of file dvector.cpp.
dvector::dvector | ( | char * | filename, |
const int & | column | ||
) |
Construct dvector using matrix input from text filename.
Select column from matrix.
Definition at line 49 of file dvec_io1.cpp.
Default destructor.
Invoked by the compiler. Only frees allocated memory if all shallow copies in scope have been removed. Produces an error if the double* member v is NULL.
Definition at line 66 of file dvector.cpp.
const double* dvector::address | ( | ) | const [inline] |
Definition at line 135 of file dvector.h.
Referenced by independent_variables::operator=().
void dvector::allocate | ( | int | ncl, |
int | nch | ||
) |
Allocate memory for a dvector.
Exits with an error message if subscript range makes no sense.
ncl | Integer specifying lowest valid subscript. |
nch | Integer specifying highest valid subscript. |
Definition at line 415 of file dvector.cpp.
Referenced by param_stddev_vector::allocate(), dmatrix::allocate(), sdmatrix::allocate(), dcompressed_triplet::allocate(), cube(), cubic_spline_function::cubic_spline_function(), dmatrix::dmatrix(), function_minimizer::hybrid_mcmc_routine(), function_minimizer::mcmc_routine(), function_minimizer::set_runtime_crit(), function_minimizer::set_runtime_maxfn(), and square().
void dvector::allocate | ( | const dvector & | dv | ) |
Allocate memory for a dvector the same size as it's argument.
dv | Reference to a dvector. |
Definition at line 464 of file dvector.cpp.
void dvector::allocate | ( | const dvar_vector & | dv | ) |
Allocate memory for a dvector the same size as it's argument.
dv | Reference to a dvar_vector. |
Definition at line 473 of file dvector.cpp.
void dvector::allocate | ( | const char * | s | ) |
Description not yet available.
Reimplemented in named_dvector.
Definition at line 251 of file dvect9.cpp.
void dvector::allocate | ( | void | ) |
Allocate dvector without allocating memory.
All pointers set to NULL and subscript range is invalid.
Definition at line 506 of file dvector.cpp.
Referenced by allocate(), named_dvector::allocate(), data_vector::allocate(), dll_data_vector::allocate(), dvector(), reallocate(), and safe_allocate().
void dvector::allocate | ( | const ad_integer & | _ncl, |
const index_type & | _nch | ||
) |
void dvector::allocatec | ( | const dvector & | t | ) |
Make shallow copy of dvector shape.
Copies the shape of its argument.
t | Reference to a dvector. |
Definition at line 483 of file dvector.cpp.
Referenced by operator=().
int dvector::allocated | ( | void | ) | const [inline] |
Returns 1 (TRUE) if memory is allocated.
Definition at line 71 of file dvector.h.
Referenced by dll_data_vector::allocate(), df1b2vector::df1b2vector(), reallocate(), and safe_allocate().
void dvector::deallocate | ( | void | ) |
Called by destructor to deallocate memory for a dvector object.
Definition at line 93 of file dvector.cpp.
Referenced by dcompressed_triplet::deallocate(), operator=(), reallocate(), safe_deallocate(), function_minimizer::set_runtime_crit(), function_minimizer::set_runtime_maxfn(), and ~dvector().
double& dvector::elem | ( | int | i | ) | [inline] |
Definition at line 143 of file dvector.h.
Referenced by acos(), allocate(), asin(), atan(), cmdv_prod(), column_value(), column_vector(), cos(), cosh(), cvdv_add(), cvdv_dot(), cvdv_elem_div(), cvdv_elem_prod(), cvdv_sub(), det(), DF_cdble_dv_div(), DF_cdvpow(), DF_dble_dv_div(), DF_dvatan(), DF_dvcos(), DF_dvcpow(), DF_dvcube(), DF_dvdvpow(), DF_dvexp(), DF_dvfourth(), DF_dvlog(), DF_dvmfexp(), DF_dvpow(), DF_dvsin(), DF_dvsqrt(), DF_dvsquare(), DF_dvtan(), DF_first_diference(), dfinvpret(), dmcv_prod(), dmdv_prod(), dmdv_solve(), dv_assign(), dv_eqprev(), dv_init(), dv_subassign(), dvcm_prod(), dvcv_add(), dvcv_dot(), dvcv_elem_div(), dvcv_elem_prod(), dvcv_sub(), dvdm_prod(), dvdv_add(), dvdv_dot(), dvdv_elem_div(), dvdv_elem_prod(), dvdv_sub(), dvector(), elem_div(), elem_prod(), exp(), extract_column(), extract_diagonal(), extract_row(), fabs(), fill(), fill_randbi(), fill_randbi_ni(), fill_randn_ni(), fill_randnegbinomial(), fill_randpoisson(), fill_randu(), fill_randu_ni(), fill_seqadd(), first_difference(), fmm::fmin(), fmmt1::fmin(), initialize(), dvar_vector::initialize(), inv(), ivector::ivector(), ln_det(), log(), log10(), lvector::lvector(), max(), mean(), mfexp(), min(), operator*(), operator*=(), operator+(), operator+=(), dvar_vector::operator+=(), operator-(), operator-(), operator-=(), dvar_vector::operator-=(), operator/(), operator/=(), operator=(), outer_prod(), pow(), read_from(), restore_dvar_vector_der_nozero(), row_vector(), save_dvector_derivatives(), save_dvector_derivatives_na(), sfabs(), sin(), sinh(), solve(), sqr(), sqrt(), sum(), tan(), tanh(), and value().
const double& dvector::elem | ( | int | i | ) | const [inline] |
void dvector::fill | ( | const char * | s | ) |
Fill vectors from values in string s.
s | should be in {v1, ..., vn} format. |
Definition at line 48 of file dvect10.cpp.
Referenced by ivector::fill(), and lvector::fill().
void dvector::fill_multinomial | ( | const int & | seed, |
const dvector & | p | ||
) |
Description not yet available.
Definition at line 17 of file dvect11.cpp.
Referenced by dvar_vector::fill_multinomial().
void dvector::fill_multinomial | ( | const random_number_generator & | rng, |
const dvector & | p | ||
) |
void dvector::fill_randbi | ( | long int & | n, |
double | p | ||
) |
void dvector::fill_randbi | ( | double | p, |
const random_number_generator & | rng | ||
) |
void dvector::fill_randbi_ni | ( | long int & | n, |
double | p | ||
) |
void dvector::fill_randcau | ( | const random_number_generator & | rng | ) |
Description not yet available.
Definition at line 27 of file drancau.cpp.
Referenced by dmatrix::fill_randcau().
void dvector::fill_randn | ( | long int & | n | ) |
Description not yet available.
Definition at line 210 of file ranfill.cpp.
Referenced by dmatrix::fill_randn(), function_minimizer::hybrid_mcmc_routine(), rmvlogistic(), and test_mcmc_options_window().
void dvector::fill_randn | ( | const random_number_generator & | rng | ) |
void dvector::fill_randn_ni | ( | long int & | n | ) |
Description not yet available.
Definition at line 102 of file ranf_ni.cpp.
Referenced by dmatrix::fill_randn(), and dmatrix::fill_randn_ni().
void dvector::fill_randnegbinomial | ( | double | lambda, |
double | tau, | ||
const random_number_generator & | rng | ||
) |
void dvector::fill_randu | ( | long int & | n | ) |
Description not yet available.
Definition at line 168 of file ranfill.cpp.
Referenced by ivector::fill_multinomial(), fill_multinomial(), lvector::fill_multinomial(), and dmatrix::fill_randu().
void dvector::fill_randu | ( | const random_number_generator & | rng | ) |
void dvector::fill_randu_ni | ( | long int & | n | ) |
Description not yet available.
Definition at line 60 of file ranf_ni.cpp.
Referenced by dmatrix::fill_randu(), and dmatrix::fill_randu_ni().
void dvector::fill_seqadd | ( | double | base, |
double | offset | ||
) |
Description not yet available.
Definition at line 68 of file cranfill.cpp.
Referenced by bicubic_spline(), calculate_laplace_approximation(), cubic_spline(), function_minimizer::dep_hess_routine(), dmatrix::fill_seqadd(), laplace_approximation_calculator::generate_antithetical_rvs(), get_solution_vector(), function_minimizer::hess_routine_and_constraint(), function_minimizer::hess_routine_noparallel(), function_minimizer::hess_routine_noparallel_random_effects(), and reorder().
unsigned int dvector::get_ncopies | ( | ) | const [inline] |
double*& dvector::get_v | ( | void | ) | [inline] |
Definition at line 139 of file dvector.h.
Referenced by dvector_position::dvector_position().
double* dvector::get_v | ( | void | ) | const [inline] |
int dvector::indexmax | ( | void | ) | const [inline] |
Get maximum valid index.
Reimplemented in dvector_index.
Definition at line 208 of file dvector.h.
Referenced by acos(), ageLengthKey(), ALK(), allocate(), ivector::allocate(), dvar_vector::allocate(), as_factor(), asin(), atan(), laplace_approximation_calculator::banded_calculations_trust_region_approach(), calculate_laplace_approximation(), cmdv_prod(), column_vector(), copy_value_from_vector(), cos(), cosh(), count_factor(), cs_ipvec(), cs_pvec(), cube(), cvdv_add(), cvdv_dot(), cvdv_elem_div(), cvdv_elem_prod(), cvdv_sub(), derch(), df1b2vector::df1b2vector(), DF_cdble_dv_diveq(), DF_cdvpow(), DF_dvatan(), DF_dvcos(), DF_dvcpow(), DF_dvcube(), DF_dvdvpow(), DF_dvexp(), DF_dvfourth(), DF_dvlog(), DF_dvmfexp(), DF_dvpow(), DF_dvsin(), DF_dvsqrt(), DF_dvsquare(), DF_dvtan(), DF_vdble_dv_diveq(), dfcholeski_sparse(), dfouter_prodvv(), dgamma(), dmcv_prod(), dmdv_prod(), dmultinom(), dnbinom(), dnbinom_tau(), dnorm(), laplace_approximation_calculator::do_newton_raphson_banded(), dv_assign(), dv_eqprev(), dv_subassign(), dvar_vector::dvar_vector(), dvcv_add(), dvcv_dot(), dvcv_elem_div(), dvcv_elem_prod(), dvcv_sub(), dvdm_prod(), dvdv_add(), dvdv_dot(), dvdv_elem_div(), dvdv_elem_prod(), dvdv_sub(), dvector(), dvector_position::dvector_position(), dzinbinom(), elem_div(), elem_prod(), evaluate_function_gradient(), exp(), fabs(), factln(), fill(), ivector::fill_multinomial(), fill_multinomial(), lvector::fill_multinomial(), fill_randbi(), fill_randbi_ni(), fill_randcau(), fill_randn(), fill_randn_ni(), fill_randnegbinomial(), fill_randpoisson(), fill_randu(), fill_randu_ni(), fill_seqadd(), first_difference(), funnel_derivatives(), gammln(), gauss_hermite(), gauss_legendre(), get_confidence_interval(), get_eigen_values(), get_ft(), get_onesided_intervals(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), ghk(), function_minimizer::hess_routine_noparallel_random_effects(), histogram(), imtqlx(), dvar_compressed_triplet::indexmax(), dcompressed_triplet::indexmax(), initialize(), dvar_vector::initialize(), function_minimizer::limited_memory_quasi_newton(), function_minimizer::limited_memory_quasi_newton_block(), laplace_approximation_calculator::lincg(), log(), log10(), log_comb(), lower_triangular_solve(), lower_triangular_solve_trans(), lvector::lvector(), make_preliminary_hist(), MAT(), max(), maxnz(), function_minimizer::mcmc_routine(), mean(), mfexp(), min(), function_minimizer::minimize(), minnz(), multifan(), nograd_assign(), nograd_assign_column(), nograd_assign_row(), function_minimizer::normalize_posterior_distribution(), operator&(), vcubic_spline_function::operator()(), cubic_spline_function::operator()(), operator*(), operator*=(), operator+(), operator+=(), dvar_vector::operator+=(), operator-(), operator-(), operator-=(), dvar_vector::operator-=(), operator/(), operator/=(), operator<<(), operator=(), independent_variables::operator=(), dvar_vector::operator=(), cifstream::operator>>(), outer_prod(), pow(), print_hist_data(), print_is_diagnostics(), function_minimizer::prof_minimize(), function_minimizer::prof_minimize_re(), function_minimizer::quasi_newton_block(), function_minimizer::random_effects_maximization(), rdirichlet(), read_from(), read_hist_data(), reallocate(), rmvlogistic(), robust_regression(), row_vector(), sample(), save_dvector_derivatives(), save_dvector_derivatives_na(), save_dvector_value(), function_minimizer::set_runtime_crit(), function_minimizer::set_runtime_maxfn(), param_init_vector_vector::set_scalefactor(), param_init_bounded_vector_vector::set_scalefactor(), param_init_matrix_vector::set_scalefactor(), param_init_bounded_matrix_vector::set_scalefactor(), param_init_number_vector::set_scalefactor(), param_init_bounded_number_vector::set_scalefactor(), init_df1b2vector::set_value(), set_value_inv(), set_value_inv_partial(), sfabs(), sgn(), shape_check(), sin(), sinh(), smooth(), solve(), solve_trans(), sort(), spline(), splint(), sqr(), sqrt(), square(), sum(), tan(), tanh(), tmpxchol1(), trans(), unique(), varchol(), write_empirical_covariance_matrix(), write_on(), and dll_data_vector::~dll_data_vector().
int dvector::indexmin | ( | void | ) | const [inline] |
Get minimum valid index.
Reimplemented in dvector_index.
Definition at line 202 of file dvector.h.
Referenced by acos(), ageLengthKey(), ALK(), allocate(), ivector::allocate(), dvar_vector::allocate(), as_factor(), asin(), atan(), laplace_approximation_calculator::banded_calculations_trust_region_approach(), cmdv_prod(), column_vector(), copy_value_from_vector(), cos(), cosh(), count_factor(), cube(), cvdv_add(), cvdv_dot(), cvdv_elem_div(), cvdv_elem_prod(), cvdv_sub(), derch(), df1b2vector::df1b2vector(), DF_cdble_dv_diveq(), DF_cdvpow(), DF_dvatan(), DF_dvcos(), DF_dvcpow(), DF_dvcube(), DF_dvdvpow(), DF_dvexp(), DF_dvfourth(), DF_dvlog(), DF_dvmfexp(), DF_dvpow(), DF_dvsin(), DF_dvsqrt(), DF_dvsquare(), DF_dvtan(), DF_vdble_dv_diveq(), dfcholeski_sparse(), dfouter_prodvv(), dgamma(), dmcv_prod(), dmdv_prod(), dmultinom(), dnbinom(), dnbinom_tau(), dnorm(), dv_assign(), dv_eqprev(), dv_subassign(), dvar_vector::dvar_vector(), dvcv_add(), dvcv_dot(), dvcv_elem_div(), dvcv_elem_prod(), dvcv_sub(), dvdm_prod(), dvdv_add(), dvdv_dot(), dvdv_elem_div(), dvdv_elem_prod(), dvdv_sub(), dvector(), dvector_position::dvector_position(), dzinbinom(), elem_div(), elem_prod(), exp(), fabs(), factln(), fill(), ivector::fill_multinomial(), fill_multinomial(), lvector::fill_multinomial(), fill_randbi(), fill_randbi_ni(), fill_randcau(), fill_randn(), fill_randn_ni(), fill_randnegbinomial(), fill_randpoisson(), fill_randu(), fill_randu_ni(), fill_seqadd(), first_difference(), fmm::fmin(), fmmt1::fmin(), gammln(), gauss_hermite(), get_confidence_interval(), get_eigen_values(), get_ft(), get_onesided_intervals(), gradcalc(), function_minimizer::hess_inv(), function_minimizer::hess_routine_noparallel_random_effects(), histogram(), imtqlx(), dvar_compressed_triplet::indexmin(), dcompressed_triplet::indexmin(), initialize(), dvar_vector::initialize(), initpointer(), gradient_structure::jacobcalc(), log(), log10(), log_comb(), lower_triangular_solve(), lower_triangular_solve_trans(), lvector::lvector(), make_preliminary_hist(), MAT(), max(), maxnz(), function_minimizer::mcmc_routine(), mean(), mfexp(), min(), minnz(), multifan(), function_minimizer::neldmead(), nograd_assign(), nograd_assign_column(), nograd_assign_row(), operator&(), vcubic_spline_function::operator()(), cubic_spline_function::operator()(), operator*(), operator*=(), operator+(), operator+=(), dvar_vector::operator+=(), operator-(), operator-(), operator-=(), dvar_vector::operator-=(), operator/(), operator/=(), operator<<(), operator=(), independent_variables::operator=(), dvar_vector::operator=(), cifstream::operator>>(), outer_prod(), pow(), print_is_diagnostics(), function_minimizer::random_effects_maximization(), rdirichlet(), read_from(), reallocate(), rmvlogistic(), robust_regression(), row_vector(), sample(), save_dvector_derivatives(), save_dvector_derivatives_na(), save_dvector_value(), function_minimizer::set_runtime_crit(), function_minimizer::set_runtime_maxfn(), param_init_vector_vector::set_scalefactor(), param_init_bounded_vector_vector::set_scalefactor(), param_init_matrix_vector::set_scalefactor(), param_init_bounded_matrix_vector::set_scalefactor(), param_init_number_vector::set_scalefactor(), param_init_bounded_number_vector::set_scalefactor(), init_df1b2vector::set_value(), set_value_inv(), set_value_inv_partial(), sfabs(), sgn(), shape_check(), shift(), sin(), sinh(), smooth(), solve(), solve_trans(), sort(), spline(), spline_cubic_val(), spline_cubic_val2(), splint(), sqr(), sqrt(), square(), sum(), tan(), tanh(), tmpxchol1(), trans(), tri_dag(), tri_dagv(), unique(), varchol(), vector2matrix(), write_on(), and dll_data_vector::~dll_data_vector().
void dvector::initialize | ( | void | ) |
Sets all elements to zero.
Definition at line 16 of file dvect5.cpp.
Referenced by betacf(), laplace_approximation_calculator::block_diagonal_calculations(), bounded_multivariate_cauchy(), bounded_multivariate_mixture(), bounded_multivariate_normal(), bounded_multivariate_uniform(), bounded_robust_multivariate_normal(), choleski_decomp_trust_bound(), cmdv_prod(), colsum(), cs_add(), DF_first_diference(), df_ln_det_choleski(), df_xdet(), df_xldet(), dfbltsolve(), dfcholeski_decomp(), dfcholeski_decomp_banded(), dfcholeski_decomp_banded_positive(), dfcholeski_decomp_positive(), dfcholeski_sparse(), dfinvpret(), dfouter_prodvv(), dmdv_solve(), dmultinom(), dmvlogistic(), laplace_approximation_calculator::do_newton_raphson_banded(), laplace_approximation_calculator::do_newton_raphson_state_space(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_block_diagonal(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_importance_sampling_adjoint(), dvcm_prod(), fcomp1(), fmm::fmin(), fmmt1::fmmt1(), laplace_approximation_calculator::generate_antithetical_rvs(), laplace_approximation_calculator::get_fx_fu(), laplace_approximation_calculator::get_gradient_for_hessian_calcs(), get_inverse_sparse_hessian(), get_solution_vector(), laplace_approximation_calculator::get_uhat_lm_newton2(), laplace_approximation_calculator::get_uhat_quasi_newton(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), laplace_approximation_calculator::get_uhat_quasi_newton_qd(), gradcalc(), function_minimizer::hess_routine_noparallel_random_effects(), function_minimizer::hybrid_mcmc_routine(), dmatrix::initialize(), dcompressed_triplet::initialize(), inv(), gradient_structure::jacobcalc(), laplace_approximation_calculator::laplace_approximation_calculator(), function_minimizer::limited_memory_quasi_newton(), laplace_approximation_calculator::local_minimization(), function_minimizer::mcmc_routine(), fmm::minimize(), function_minimizer::monte_carlo_routine(), new_probing_bounded_multivariate_normal(), new_probing_bounded_multivariate_normal_mcmc(), function_minimizer::normalize_posterior_distribution(), probing_bounded_multivariate_normal(), reallocate(), and solve().
double* dvector::initpointer | ( | void | ) | [inline] |
const double* dvector::initpointer | ( | void | ) | const [inline] |
bool dvector::is_valid_index | ( | const int | i | ) | const |
Check index i is in dvector bounds [index_min, index_max].
i | row index |
Definition at line 20 of file dvec_acc.cpp.
int dvector::operator! | ( | void | ) | const [inline] |
dvector dvector::operator() | ( | int | lb, |
int | ub | ||
) | [inline] |
const double & dvector::operator() | ( | int | i | ) | const [inline] |
dvector & dvector::operator*= | ( | double | v1 | ) |
Multiply elements of a vector by a constant.
x | constant for multiplication. |
Definition at line 30 of file dvect20.cpp.
dvector& dvector::operator++ | ( | void | ) | [inline] |
dvector & dvector::operator+= | ( | double | v1 | ) |
dvector dvector::operator- | ( | void | ) |
dvector& dvector::operator-- | ( | void | ) | [inline] |
dvector & dvector::operator-= | ( | double | v1 | ) |
dvector & dvector::operator/= | ( | double | v1 | ) |
Divide elements of a vector by a constant.
x | constant to divide vector by. |
Definition at line 17 of file dvect20.cpp.
double & dvector::operator[] | ( | int | i | ) | [inline] |
Reimplemented in dvector_index.
const double & dvector::operator[] | ( | int | i | ) | const [inline] |
void dvector::read_from | ( | const uistream & | _s | ) |
Description not yet available.
Definition at line 77 of file dvec_io2.cpp.
Referenced by operator>>().
void dvector::read_from | ( | const istream & | _s | ) |
void dvector::reallocate | ( | double | s | ) |
void dvector::safe_allocate | ( | int | ncl, |
int | nch | ||
) |
Safely allocate memory for a dvector.
Exits with an error message if memory for this instance has already been allocated.
ncl | Integer specifying lowest valid subscript. |
nch | Integer specifying highest valid subscript. |
Definition at line 396 of file dvector.cpp.
void dvector::safe_deallocate | ( | void | ) |
Safely deallocates memory by reporting if shallow copies are still in scope.
Definition at line 111 of file dvector.cpp.
void dvector::save_dvector_derivatives | ( | const dvar_vector_position & | pos | ) | const |
Puts the derivative values in a dvector into a dvar_vector's guts.
Definition at line 164 of file cmpdif5.cpp.
Referenced by cmdv_prod(), DF_cdble_dv_div(), DF_cdble_dv_diveq(), DF_dv_cdble_div(), DF_dv_double_prod(), DF_dvatan(), DF_dvcube(), DF_dvfourth(), DF_dvlog(), DF_dvsqrt(), DF_dvsquare(), DF_vdble_dv_diveq(), dfbltsolve(), dfcholeski_sparse(), dmdv_prod(), dmdv_solve(), dv_minuseq(), dv_pluseq(), dvcm_prod(), dvdm_prod(), dvdv_add(), banded_lower_triangular_dmatrix::save_dmatrix_derivatives(), and X_dv_sum().
void dvector::save_dvector_derivatives | ( | void | ) | const |
void dvector::save_dvector_derivatives_na | ( | const dvar_vector_position & | pos | ) | const |
void dvector::save_dvector_position | ( | void | ) | const |
Description not yet available.
Definition at line 28 of file cmpdif4.cpp.
Referenced by det(), elem_prod(), funnel_gradcalc(), inv(), ln_det(), operator*(), pow(), and solve().
void dvector::save_dvector_value | ( | void | ) | const |
Saves the size, address, and value information for a dvector.
Definition at line 101 of file cmpdif4.cpp.
Referenced by det(), elem_prod(), funnel_gradcalc(), inv(), ln_det(), operator*(), pow(), and solve().
void dvector::shallow_copy | ( | const dvector & | t | ) |
Explicit shallow copy.
t | dvector to be copied |
Definition at line 172 of file dvector.cpp.
int dvector::size | ( | ) | const [inline] |
Get number of elements in array.
Definition at line 214 of file dvector.h.
Referenced by allocate(), calculate_importance_sample(), calculate_importance_sample_block_diagonal(), calculate_importance_sample_block_diagonal_funnel(), calculate_importance_sample_block_diagonal_option2(), calculate_importance_sample_block_diagonal_option_antithetical(), calculate_importance_sample_funnel(), calculate_importance_sample_shess(), calculate_laplace_approximation(), do_gauss_hermite_block_diagonal(), do_gauss_hermite_block_diagonal_multi(), dvector(), fill(), ivector::fill_multinomial(), fill_multinomial(), lvector::fill_multinomial(), dmatrix::fill_seqadd(), first_difference(), fmm::fmin(), fmmt1::fmin(), get_eigen(), get_eigen_values(), get_eigenv(), gradcalc(), function_minimizer::hybrid_mcmc_routine(), lvector::lvector(), mean(), fmm::minimize(), nllBeta(), nllGamma(), nllInverseGamma(), nllLognormal(), nllLognormal2(), nllNegativeBinomial(), nllNormal(), nllNormal2(), nllPoisson(), operator&(), operator=(), rdirichlet(), sample(), size_count(), sort(), spline(), splint(), std_dev(), tri_dag(), tri_dagv(), unique(), var(), and vector2matrix().
dvector dvector::sub | ( | int | lb, |
int | ub | ||
) | [inline] |
int& dvector::testmax | ( | ) | [inline] |
int& dvector::testmin | ( | ) | [inline] |
void dvector::write_on | ( | const ostream & | _s | ) | const |
Description not yet available.
Definition at line 49 of file dvect_io.cpp.
Referenced by operator<<().
void dvector::write_on | ( | const uostream & | _s | ) | const |
friend class banded_lower_triangular_dmatrix [friend] |
friend class banded_lower_triangular_dvar_matrix [friend] |
friend class banded_symmetric_dmatrix [friend] |
friend class banded_symmetric_dvar_matrix [friend] |
friend class dvar_vector [friend] |
Element-wise division of two vectors; constant objects.
Exits with error if bounds of the two arguments differ.
t1 | A vector, with valid subscripts in |
t2 | A vector, with valid subscripts in |
Definition at line 52 of file dvect2.cpp.
dvar_vector elem_div | ( | const dvector & | v1, |
const dvar_vector & | v2 | ||
) | [friend] |
dvar_vector elem_div | ( | const dvar_vector & | v1, |
const dvector & | v2 | ||
) | [friend] |
Element-wise multiplication of two vectors; constant objects.
Exits with error if bounds of the two arguments differ.
t1 | A vector, with valid subscripts in |
t2 | A vector, with valid subscripts in |
Definition at line 20 of file dvect2.cpp.
dvar_vector elem_prod | ( | const dvector & | v1, |
const dvar_vector & | v2 | ||
) | [friend] |
dvar_vector elem_prod | ( | const dvar_vector & | v1, |
const dvector & | v2 | ||
) | [friend] |
dvector first_difference | ( | const dvector & | x | ) | [friend] |
Description not yet available.
Definition at line 62 of file dvect7.cpp.
Referenced by operator=(), reallocate(), save_dvector_derivatives(), save_dvector_derivatives_na(), and save_dvector_value().
Description not yet available.
Definition at line 79 of file dvect7.cpp.
Referenced by operator=(), save_dvector_derivatives(), save_dvector_derivatives_na(), save_dvector_value(), and shift().
Norm of a vector; constant objects.
t1 | A vector, . |
Definition at line 18 of file dvect3.cpp.
Squared norm of a vector; constant objects.
Computes the sum of squares of its vector argument.
t1 | A vector, . |
Definition at line 34 of file dvect3.cpp.
Compute the dot product of two vectors.
The minimum and maxium legal subscripts of the arguments must agree; otherwize an error message is printed and execution terminates.
t1 | A dvector, . |
t2 | A dvector, . |
Definition at line 523 of file dvector.cpp.
dvariable operator* | ( | const dvector & | cv1, |
const dvar_vector & | v2 | ||
) | [friend] |
dvariable operator* | ( | const dvar_vector & | v2, |
const dvector & | cv1 | ||
) | [friend] |
dvar_vector operator* | ( | const prevariable & | x, |
const dvector & | t1 | ||
) | [friend] |
Multiply a dvector by a constant.
x | Double constant, . |
t1 | dvector reference, . |
Definition at line 646 of file dvector.cpp.
dvar_vector operator* | ( | const dvector & | x, |
const dvar_matrix & | m | ||
) | [friend] |
dvar_vector operator* | ( | const dvar_matrix & | x, |
const dvector & | m | ||
) | [friend] |
Add two dvectors.
Exits with error if bounds of the two arguments differ.
t1 | dvector reference, . |
t2 | dvector reference, . |
Definition at line 570 of file dvector.cpp.
dvar_vector operator+ | ( | const dvar_vector & | v1, |
const dvector & | v2 | ||
) | [friend] |
dvar_vector operator+ | ( | const dvector & | v1, |
const dvar_vector & | v2 | ||
) | [friend] |
Subtract two dvectors.
Exits with error if bounds of the two arguments differ.
t1 | dvector reference, . |
t2 | dvector reference, . |
Definition at line 609 of file dvector.cpp.
dvar_vector operator- | ( | const dvar_vector & | v1, |
const dvector & | v2 | ||
) | [friend] |
dvar_vector operator- | ( | const dvector & | v1, |
const dvar_vector & | v2 | ||
) | [friend] |
dvector second_difference | ( | const dvector & | ) | [friend] |
Definition at line 39 of file dvect3.cpp.
int dvector::index_max [protected] |
maximum valid subscript
Definition at line 55 of file dvector.h.
Referenced by allocate(), allocatec(), dvector(), indexmax(), is_valid_index(), operator++(), operator--(), shallow_copy(), shift(), and size().
int dvector::index_min [protected] |
minimum valid subscript
Definition at line 54 of file dvector.h.
Referenced by allocate(), allocatec(), dvector(), indexmin(), is_valid_index(), operator++(), operator--(), shallow_copy(), shift(), and size().
vector_shapex* dvector::shape [protected] |
pointer to vector "shape"
Definition at line 60 of file dvector.h.
Referenced by allocate(), allocatec(), allocated(), deallocate(), dvector(), get_ncopies(), operator!(), operator=(), safe_deallocate(), shallow_copy(), shift(), testmax(), testmin(), and ~dvector().
double* dvector::v [protected] |
pointer to the data
Definition at line 53 of file dvector.h.
Referenced by address(), allocate(), allocatec(), deallocate(), dvar_vector::dvar_vector(), dvector(), elem(), get_v(), initpointer(), operator()(), operator++(), operator--(), operator=(), independent_variables::operator=(), operator[](), save_dvector_derivatives(), shallow_copy(), shift(), and ~dvector().
Generated on Tue Mar 8 2016 19:51:39 for ADMB Documentation by 1.8.0 |