|
ADMB Documentation
-a65f1c97
|
Array of integers(int) with indexes from index_min to indexmax. More...
#include <ivector.h>
Public Member Functions | |
| ivector () | |
| Default constructor. More... | |
| ivector (const lvector &) | |
| ivector (const dvector &) | |
| Construct ivector with same dimensions as u. More... | |
| ivector (int ncl, int ncu) | |
| Allocate vector of integers with dimension [ncl to nch]. More... | |
| ivector (const ad_integer &ncl, const index_type &ncu) | |
| Description not yet available. More... | |
| ivector (unsigned int sz, long int *x) | |
| Constructor. More... | |
| ivector (const preivector &pd) | |
| Description not yet available. More... | |
| ivector (const ivector &t) | |
| Copy constructor. More... | |
| ~ivector () | |
| Default destructor. More... | |
| void | allocate (const ad_integer &ncl, const index_type &ncu) |
| Allocate vector of integers with dimension [_ncl to _nch]. More... | |
| void | allocate (int ncl, int ncu) |
| Allocate vector of integers with dimension [ncl to nch]. More... | |
| void | allocate (const ivector &iv) |
| Description not yet available. More... | |
| void | allocate (const dvector &dv) |
| Description not yet available. More... | |
| void | allocate (const char *) |
| void | allocate () |
| Does not allocate, but initializes class members. More... | |
| int | allocated () const |
| void | deallocate () |
| Deallocate i3_array memory. More... | |
| int & | elem (int i) |
| const int & | elem (int i) const |
| void | fill (const char *s) |
| Description not yet available. More... | |
| void | fill_multinomial (const int &seed, const dvector &p) |
| Description not yet available. More... | |
| void | fill_multinomial (const random_number_generator &rng, const dvector &p) |
| Description not yet available. More... | |
| void | fill_seqadd (int, int) |
| Fills ivector elements with values starting from base and incremented by offset. More... | |
| unsigned int | get_ncopies () const |
| int * | get_v () const |
| int | indexmax () const |
| int | indexmin () const |
| void | initialize (void) |
| Description not yet available. More... | |
| int | operator! () const |
| int & | operator() (int i) |
| const int & | operator() (int i) const |
| ivector | operator() (int lb, int ub) |
| ivector | operator() (const ivector &u) |
| Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More... | |
| ivector & | operator++ () |
| ivector & | operator+= (const ivector &t) |
| Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More... | |
| ivector & | operator+= (int t) |
| Add value to each element of ivec. More... | |
| ivector & | operator-- () |
| ivector & | operator= (const ivector &t) |
| Description not yet available. More... | |
| ivector & | operator= (int t) |
| Assigns value to all elements of ivector. More... | |
| ivector & | operator= (const lvector &t) |
| int & | operator[] (int i) |
| const int & | operator[] (int i) const |
| void | read_from (const istream &s) |
| Reads all the elements from istream _s. More... | |
| void | read_from (const uistream &s) |
| Read values from input into ivector. More... | |
| void | reallocate (double size) |
| Reallocate size of array. More... | |
| void | safe_allocate (int ncl, int ncu) |
| Description not yet available. More... | |
| void | safe_deallocate () |
| Safely deallocates memory by reporting if shallow copies are still in scope. More... | |
| void | save_ivector_position () const |
| Description not yet available. More... | |
| void | save_ivector_value () const |
| Saves the size, address, and value information for a ivector. More... | |
| void | shallow_copy (const ivector &t) |
| Shallow copy other data structure pointers. More... | |
| ivector & | shift (int min) |
| Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More... | |
| unsigned int | size () const |
| ivector | sub (int lb, int ub) |
| void | write_on (const ostream &s) const |
| Writes all the elements to the ostream _s. More... | |
| void | write_on (const uostream &s) const |
| Write ivector values to output. More... | |
Protected Attributes | |
| int | index_max |
| int | index_min |
| vector_shapex * | shape |
| int * | v |
Friends | |
| class | i3_array |
| class | imatrix |
| class | vector_index |
Array of integers(int) with indexes from index_min to indexmax.
| ivector::ivector | ( | ) |
Default constructor.
Definition at line 37 of file ivector.cpp.
Referenced by data_ivector::allocate(), and fill().
| ivector::ivector | ( | const lvector & | ) |
| ivector::~ivector | ( | ) |
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 70 of file ivector.cpp.
| ivector::ivector | ( | const dvector & | u | ) |
Construct ivector with same dimensions as u.
Definition at line 231 of file ivector.cpp.
| ivector::ivector | ( | int | ncl, |
| int | nch | ||
| ) |
Allocate vector of integers with dimension [ncl to nch].
| ncl | lower vector index |
| nch | upper vector index |
Definition at line 252 of file ivector.cpp.
| ivector::ivector | ( | const ad_integer & | ncl, |
| const index_type & | nch | ||
| ) |
| ivector::ivector | ( | unsigned int | sz, |
| long int * | x | ||
| ) |
Constructor.
Definition at line 206 of file ivector.cpp.
| ivector::ivector | ( | const preivector & | pdv | ) |
| ivector::ivector | ( | const ivector & | t | ) |
Copy constructor.
Definition at line 44 of file ivector.cpp.
| void ivector::allocate | ( | const ad_integer & | _ncl, |
| const index_type & | _nch | ||
| ) |
Allocate vector of integers with dimension [_ncl to _nch].
| _ncl | lower vector index |
| _nch | upper vector index |
Definition at line 488 of file indextyp.cpp.
Referenced by imatrix::allocate(), hs_symbolic::hs_symbolic(), imatrix::imatrix(), laplace_approximation_calculator::laplace_approximation_calculator(), function_minimizer::sd_routine(), set_partition_sizes(), and square().
| void ivector::allocate | ( | int | ncl, |
| int | nch | ||
| ) |
Allocate vector of integers with dimension [ncl to nch].
| ncl | lower vector index |
| nch | upper vector index |
Definition at line 263 of file ivector.cpp.
| void ivector::allocate | ( | const ivector & | dv | ) |
| void ivector::allocate | ( | const dvector & | dv | ) |
| void ivector::allocate | ( | const char * | ) |
| void ivector::allocate | ( | void | ) |
Does not allocate, but initializes class members.
Definition at line 316 of file ivector.cpp.
Referenced by allocate(), named_ivector::allocate(), data_ivector::allocate(), deallocate(), ivector(), reallocate(), safe_allocate(), and shallow_copy().
|
inline |
Definition at line 63 of file ivector.h.
Referenced by operator=(), reallocate(), and safe_allocate().
| void ivector::deallocate | ( | void | ) |
Deallocate i3_array memory.
Definition at line 91 of file ivector.cpp.
Referenced by reallocate(), safe_deallocate(), and ~ivector().
|
inline |
Definition at line 90 of file ivector.h.
Referenced by det(), dvector::dvector(), fill_seqadd(), inv(), ivector(), ln_det(), ludcmp_index(), lvector::lvector(), max(), min(), operator=(), and pow().
| void ivector::fill | ( | const char * | s | ) |
| void ivector::fill_multinomial | ( | const int & | seed, |
| const dvector & | p | ||
| ) |
| void ivector::fill_multinomial | ( | const random_number_generator & | rng, |
| const dvector & | p | ||
| ) |
| void ivector::fill_seqadd | ( | int | base, |
| int | offset | ||
| ) |
Fills ivector elements with values starting from base and incremented by offset.
| base | initial value |
| offset | incremental value |
Definition at line 73 of file cranfill.cpp.
Referenced by banded_lower_triangular_dmatrix::banded_lower_triangular_dmatrix(), banded_lower_triangular_dvar_matrix::banded_lower_triangular_dvar_matrix(), banded_symmetric_dmatrix::banded_symmetric_dmatrix(), banded_symmetric_dvar_matrix::banded_symmetric_dvar_matrix(), det(), dmatrix::dmatrix(), imatrix::fill_seqadd(), shareinfo::get_inv_matrix_shared(), shareinfo::get_inv_vector_shared(), getreindex(), inv(), ln_det(), ludcmp(), ludcmp_index(), banded_symmetric_dmatrix::operator=(), reorder(), solve(), and admb_deprecated::sort().
|
inline |
Definition at line 114 of file ivector.h.
Referenced by imatrix::allocate(), dvar_matrix::allocate(), dmatrix::allocate(), d3_array::allocate(), dvar3_array::allocate(), d4_array::allocate(), colsum(), column(), df_xldet(), dfinvpret(), dmatrix::dmatrix(), dmatrix_position::dmatrix_position(), dmdv_solve(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_banded(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_banded_adjoint(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_block_diagonal(), laplace_approximation_calculator::do_separable_stuff_newton_raphson_banded(), laplace_approximation_calculator::do_separable_stuff_newton_raphson_block_diagonal(), laplace_approximation_calculator::do_separable_stuff_x_u_block_diagonal(), dvar_matrix_position::dvar_matrix_position(), laplace_approximation_calculator::get_block_diagonal_hessian(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), inv(), ivector_position::ivector_position(), mfexp(), nograd_assign(), nograd_assign_trans(), dvar_matrix_position::operator()(), dmatrix_position::operator()(), operator*(), operator+(), operator+=(), operator-(), DF_FILE::restore_dmatrix_position(), DF_FILE::restore_dvar_matrix_position(), DF_FILE::restore_ivector_value(), rowsum(), DF_FILE::save_dmatrix_position(), DF_FILE::save_dvar_matrix_position(), DF_FILE::save_ivector_value(), funnel_init_df1b2variable::set_index(), funnel_init_df1b2vector::set_index(), solve(), sum(), use_shape(), and value().
|
inline |
Definition at line 104 of file ivector.h.
Referenced by factor::allocate(), allocate(), dvar_matrix::allocate(), dmatrix::allocate(), d3_array::allocate(), dvar3_array::allocate(), lmatrix::allocate(), laplace_approximation_calculator::block_diagonal_calculations(), laplace_approximation_calculator::build_up_nested_shape(), laplace_approximation_calculator::check_hessian_type(), laplace_approximation_calculator::check_hessian_type2(), check_order(), laplace_approximation_calculator::check_sparse_matrix_structure(), clean(), common(), count_factor(), laplace_approximation_calculator::default_calculations_check_derivatives(), dfcholeski_sparse(), dmatrix::dmatrix(), dvector::dvector(), fill(), fill_multinomial(), fill_seqadd(), laplace_approximation_calculator::get_newton_raphson_info_banded(), multi_index::get_offset(), getreindex(), imatrix::imatrix(), vector_index::indexmax(), initialize(), ivector(), ivector_check(), ivector_position::ivector_position(), laplace_approximation_calculator::laplace_approximation_calculator(), lmatrix::lmatrix(), lvector::lvector(), max(), min(), norm2(), operator()(), dvector::operator()(), lvector::operator()(), df1b2vector::operator()(), dvar_vector::operator()(), dmatrix::operator()(), operator*(), operator+(), multi_index::operator++(), operator+=(), operator-(), operator=(), df1b2quadratic_prior::operator=(), cifstream::operator>>(), pow(), read_from(), reallocate(), reorder(), DF_FILE::save_ivector_value(), admb_deprecated::sort(), sort(), square(), sum(), tmpxchol1(), nested_calls_shape::trim(), value(), write_on(), and xxxv().
|
inline |
Definition at line 99 of file ivector.h.
Referenced by factor::allocate(), allocate(), dvar_matrix::allocate(), dmatrix::allocate(), d3_array::allocate(), dvar3_array::allocate(), lmatrix::allocate(), laplace_approximation_calculator::check_hessian_type2(), check_order(), common(), count_factor(), dfcholeski_sparse(), dmatrix::dmatrix(), dvector::dvector(), fill_multinomial(), fill_seqadd(), multi_index::get_offset(), getreindex(), imatrix::imatrix(), vector_index::indexmin(), initialize(), ivector(), ivector_check(), ivector_position::ivector_position(), laplace_approximation_calculator::laplace_approximation_calculator(), lmatrix::lmatrix(), lvector::lvector(), max(), min(), norm2(), operator()(), dvector::operator()(), lvector::operator()(), df1b2vector::operator()(), dvar_vector::operator()(), dmatrix::operator()(), operator*(), operator+(), multi_index::operator++(), operator+=(), operator-(), operator=(), cifstream::operator>>(), pow(), read_from(), reallocate(), reorder(), DF_FILE::save_ivector_value(), shift(), admb_deprecated::sort(), sort(), square(), sum(), tmpxchol1(), nested_calls_shape::trim(), value(), write_on(), and xxxv().
| void ivector::initialize | ( | void | ) |
Description not yet available.
Definition at line 17 of file ivec2.cpp.
Referenced by laplace_approximation_calculator::check_hessian_type(), laplace_approximation_calculator::check_hessian_type2(), laplace_approximation_calculator::check_sparse_matrix_structure(), cs_add(), cs_amd(), cs_counts(), cs_etree(), cs_pinv(), cs_post(), cs_transpose(), dependent_variables_information::dependent_variables_information(), dfcholeski_sparse(), laplace_approximation_calculator::get_block_diagonal_hessian(), shareinfo::get_inv_matrix_shared(), shareinfo::get_inv_vector_shared(), laplace_approximation_calculator::get_newton_raphson_info_banded(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), function_minimizer::hess_routine_noparallel_random_effects(), histogram(), hs_symperm(), nested_calls_shape::initialize(), laplace_approximation_calculator::laplace_approximation_calculator(), reallocate(), and tmpxchol1().
|
inline |
Definition at line 198 of file ivector.h.
Referenced by operator()().
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Returns a selected vector of values from ivector using positions in indexes.
Note: Assumes positions are in range [indexmin() to indexmax()].
| indexes | contains vector of valid index values |
| ivector & ivector::operator+= | ( | int | value | ) |
| ivector & ivector::operator= | ( | int | value | ) |
Assigns value to all elements of ivector.
| value | int |
Definition at line 195 of file ivector.cpp.
| void ivector::read_from | ( | const istream & | s | ) |
Reads all the elements from istream _s.
Definition at line 93 of file ivect_io.cpp.
| void ivector::read_from | ( | const uistream & | input | ) |
Read values from input into ivector.
| input | uistream |
Definition at line 40 of file ivec_io1.cpp.
| void ivector::reallocate | ( | double | s | ) |
Reallocate size of array.
| percent | change |
Definition at line 14 of file ivect11.cpp.
Referenced by cs_multiply().
| void ivector::safe_allocate | ( | int | ncl, |
| int | nch | ||
| ) |
Description not yet available.
Definition at line 78 of file ivector.cpp.
Referenced by laplace_approximation_calculator::check_hessian_type(), laplace_approximation_calculator::check_hessian_type2(), laplace_approximation_calculator::default_calculations_check_derivatives(), and laplace_approximation_calculator::get_newton_raphson_info_banded().
| void ivector::safe_deallocate | ( | void | ) |
Safely deallocates memory by reporting if shallow copies are still in scope.
Definition at line 119 of file ivector.cpp.
Referenced by laplace_approximation_calculator::check_hessian_type(), laplace_approximation_calculator::check_hessian_type2(), laplace_approximation_calculator::default_calculations_check_derivatives(), and laplace_approximation_calculator::get_newton_raphson_info_banded().
| void ivector::save_ivector_position | ( | ) | const |
| void ivector::save_ivector_value | ( | ) | const |
Saves the size, address, and value information for a ivector.
Definition at line 148 of file cmpdif4.cpp.
| void ivector::shallow_copy | ( | const ivector & | other | ) |
Shallow copy other data structure pointers.
| other | i3_array |
Definition at line 136 of file ivector.cpp.
Referenced by operator=().
| ivector & ivector::shift | ( | int | to_indexmin | ) |
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Shift current dimensions of ivector using to_indexmin as the new lower index value.
ie [1 to 5] shift to_indexmin 2 will change to [2 to 5]
Note: Size and data are unchanged.
| to_indexmin | lower index changed to |
Definition at line 17 of file ivec.cpp.
Referenced by admb_deprecated::sort().
|
inline |
Definition at line 109 of file ivector.h.
Referenced by admb_deprecated::sort(), and sort().
| void ivector::write_on | ( | const ostream & | s | ) | const |
Writes all the elements to the ostream _s.
Definition at line 42 of file ivect_io.cpp.
Referenced by operator<<().
| void ivector::write_on | ( | const uostream & | output | ) | const |
Write ivector values to output.
| output | uostream |
Definition at line 68 of file ivec_io1.cpp.
|
friend |
|
protected |
Definition at line 54 of file ivector.h.
Referenced by imatrix::allocate(), allocate(), indexmax(), ivector(), operator++(), operator--(), shallow_copy(), shift(), and size().
|
protected |
Definition at line 53 of file ivector.h.
Referenced by imatrix::allocate(), allocate(), indexmin(), ivector(), operator++(), operator--(), shallow_copy(), shift(), and size().
|
protected |
Definition at line 56 of file ivector.h.
Referenced by imatrix::allocate(), allocate(), allocated(), deallocate(), get_ncopies(), ivector(), operator!(), safe_deallocate(), shallow_copy(), and shift().
|
protected |
Definition at line 55 of file ivector.h.
Referenced by imatrix::allocate(), allocate(), deallocate(), elem(), get_v(), initialize(), ivector(), operator()(), operator++(), operator+=(), operator--(), operator=(), operator[](), read_from(), shallow_copy(), shift(), and write_on().
|
|
Generated on Wed Sep 7 2022 00:01:34 for ADMB Documentation by 1.8.5
|