NEST
2.6.0,not_revisioned_source_dir@0
|
#include <tokenarray.h>
Classes | |
class | OutOfRange |
Exception classes. More... | |
Public Member Functions | |
TokenArray (void) | |
TokenArray (size_t n, const Token &t=Token(), size_t alloc=128) | |
TokenArray (const TokenArray &a) | |
TokenArray (const TokenArrayObj &a) | |
TokenArray (const std::vector< size_t > &) | |
TokenArray (const std::vector< long > &) | |
TokenArray (const std::valarray< long > &) | |
TokenArray (const std::valarray< double > &) | |
TokenArray (const std::valarray< float > &) | |
TokenArray (const std::vector< double > &) | |
TokenArray (const std::vector< float > &) | |
virtual | ~TokenArray () |
Token * | begin () const |
Return pointer to the first element. More... | |
Token * | end () const |
Return pointer to next to last element. More... | |
size_t | size (void) const |
Return number of elements in the array. More... | |
size_t | capacity (void) const |
Return maximal number of elements that fit into the container. More... | |
Token & | operator[] (size_t i) |
const Token & | operator[] (size_t i) const |
const Token & | get (long i) const |
bool | index_is_valid (long i) const |
void | rotate (Token *t1, Token *t2, Token *t3) |
void | rotate (long n) |
bool | shrink (void) |
Reduce allocated space such that size()==capacity(). More... | |
bool | reserve (size_t n) |
Reserve space such that after the call the new capacity is n. More... | |
unsigned int | references (void) |
void | resize (size_t s, const Token &t=Token()) |
Resizes the container to size s. More... | |
void | push_back (const Token &t) |
void | push_back (Datum *d) |
void | push_back_move (Token &t) |
void | push_back_dont_clone (Token &t) |
void | assign_move (size_t i, Token &t) |
void | assign_move (TokenArray &a, size_t i, size_t n) |
void | insert_move (size_t i, TokenArray &a) |
void | insert_move (size_t i, Token &t) |
void | replace_move (size_t i, size_t n, TokenArray &a) |
void | append_move (TokenArray &a) |
void | pop_back (void) |
void | clear (void) |
void | erase (void) |
void | erase (Token *from, Token *to) |
void | erase (size_t i, size_t n) |
void | reduce (size_t i, size_t n) |
void | reverse () |
void | swap (TokenArray &a) |
const TokenArray & | operator= (const TokenArray &) |
const TokenArray & | operator= (const std::vector< long > &) |
const TokenArray & | operator= (const std::vector< double > &) |
const TokenArray & | operator= (const std::valarray< long > &) |
const TokenArray & | operator= (const std::valarray< double > &) |
bool | operator== (const TokenArray &a) const |
bool | empty (void) const |
void | info (std::ostream &) const |
void | toVector (std::vector< size_t > &) const |
Fill vectors with homogenous integer and double arrays. More... | |
void | toVector (std::vector< long > &) const |
void | toVector (std::vector< double > &) const |
void | toVector (std::vector< std::string > &) const |
void | toValarray (std::valarray< long > &) const |
void | toValarray (std::valarray< double > &) const |
bool | valid (void) const |
Protected Member Functions | |
operator TokenArrayObj () const | |
Private Member Functions | |
bool | clone (void) |
bool | detach (void) |
Private Attributes | |
TokenArrayObj * | data |
Friends | |
class | TokenArrayObj |
class | TokenStack |
|
inline |
|
inline |
References TokenArrayObj::add_reference(), and data.
|
inline |
|
inlinevirtual |
References data, and TokenArrayObj::remove_reference().
|
inline |
References TokenArrayObj::append_move(), clone(), and data.
|
inline |
|
inline |
References TokenArrayObj::assign(), TokenArrayObj::assign_move(), clear(), data, and references().
|
inline |
Return pointer to the first element.
References TokenArrayObj::begin(), and data.
Referenced by __pyx_f_12pynestkernel_sli_array_to_object(), array2vector(), nest::AbstractLayer::create_layer(), erase(), AddtotrieFunction::execute(), SLIArrayModule::ArrayloadFunction::execute(), SLIArrayModule::FlattenFunction::execute(), SLIArrayModule::TransposeFunction::execute(), SLIArrayModule::PartitionFunction::execute(), SLIArrayModule::Put_a_a_tFunction::execute(), SLIArrayModule::GetMaxFunction::execute(), SLIArrayModule::GetMinFunction::execute(), Search_aFunction::execute(), operator<<(), nest::Network::restore_nodes(), reverse(), rotate(), nest::Multimeter::Parameters_::set(), nest::RecordingDevice::Parameters_::set(), toValarray(), and toVector().
|
inline |
Return maximal number of elements that fit into the container.
References TokenArrayObj::capacity(), and data.
|
inline |
References erase().
Referenced by assign_move(), nest::MsgHandler::clear(), and TypeTrie::toTokenArray().
|
inlineprivate |
References data, TokenArrayObj::references(), TokenArrayObj::remove_reference(), and TokenArrayObj.
Referenced by append_move(), assign_move(), erase(), insert_move(), operator[](), pop_back(), push_back(), push_back_move(), reduce(), replace_move(), resize(), reverse(), and rotate().
|
inlineprivate |
References data, TokenArrayObj::references(), TokenArrayObj::remove_reference(), and TokenArrayObj.
Referenced by erase().
|
inline |
References size().
|
inline |
Return pointer to next to last element.
References data, and TokenArrayObj::end().
Referenced by array2vector(), nest::AbstractLayer::create_layer(), erase(), AddtotrieFunction::execute(), SLIArrayModule::ArrayloadFunction::execute(), SLIArrayModule::FlattenFunction::execute(), SLIArrayModule::TransposeFunction::execute(), SLIArrayModule::PartitionFunction::execute(), SLIArrayModule::Put_a_a_tFunction::execute(), Search_aFunction::execute(), operator<<(), nest::Network::restore_nodes(), reverse(), rotate(), nest::Multimeter::Parameters_::set(), nest::RecordingDevice::Parameters_::set(), toValarray(), and toVector().
|
inline |
References begin(), detach(), and end().
Referenced by clear(), and DictionaryStack::toArray().
References TokenArrayObj::begin(), clone(), data, and TokenArrayObj::erase().
|
inline |
References clone(), data, TokenArrayObj::erase(), and size().
|
inline |
References data, and TokenArrayObj::get().
Referenced by nest::Network::convergent_connect(), nest::Network::divergent_connect(), nest::Layer< D >::dump_connections(), Get_aFunction::execute(), Get_a_aFunction::execute(), SLIArrayModule::IMapFunction::execute(), SLIgraphics::WritePGMFunction::execute(), SLIArrayModule::MapThreadFunction::execute(), SLIArrayModule::IMapThreadFunction::execute(), SLIArrayModule::IMapIndexedFunction::execute(), IforallarrayFunction::execute(), IforallindexedarrayFunction::execute(), nest::NestModule::GetStatus_aFunction::execute(), SLIArrayModule::GetMaxFunction::execute(), SLIArrayModule::GetMinFunction::execute(), nest::Network::random_convergent_connect(), and nest::Network::random_divergent_connect().
|
inline |
References data, and TokenArrayObj::index_is_valid().
Referenced by IforallarrayFunction::execute().
void TokenArray::info | ( | std::ostream & | ) | const |
|
inline |
References clone(), data, and TokenArrayObj::insert_move().
|
inline |
References clone(), data, and TokenArrayObj::insert_move().
|
inlineprotected |
References data.
const TokenArray & TokenArray::operator= | ( | const TokenArray & | a | ) |
References TokenArrayObj::add_reference(), data, and TokenArrayObj::remove_reference().
const TokenArray& TokenArray::operator= | ( | const std::vector< long > & | ) |
const TokenArray& TokenArray::operator= | ( | const std::vector< double > & | ) |
const TokenArray& TokenArray::operator= | ( | const std::valarray< long > & | ) |
const TokenArray& TokenArray::operator= | ( | const std::valarray< double > & | ) |
|
inline |
References data.
|
inline |
References clone(), data, and TokenArrayObj::pop_back().
|
inline |
References clone(), data, and TokenArrayObj::push_back().
Referenced by __pyx_f_12pynestkernel_python_object_to_datum(), __pyx_pf_12pynestkernel_10NESTEngine_12push_connection_datums(), SLIInterpreter::addlinkeddynmodule(), SLIInterpreter::addmodule(), Get_a_aFunction::execute(), nest::TopologyModule::GetGlobalChildren_i_M_aFunction::execute(), SLIArrayModule::FlattenFunction::execute(), SLIArrayModule::SortFunction::execute(), SLIArrayModule::TransposeFunction::execute(), SLIArrayModule::PartitionFunction::execute(), nest::NestModule::GetNodes_i_D_b_bFunction::execute(), Cva_dFunction::execute(), nest::NestModule::GetLeaves_i_D_bFunction::execute(), nest::NestModule::GetChildren_i_D_bFunction::execute(), ValuesFunction::execute(), SLIArrayModule::AreaFunction::execute(), nest::NestModule::GetStatus_aFunction::execute(), nest::NestModule::Cva_CFunction::execute(), SLIArrayModule::Area2Function::execute(), SLIArrayModule::GaborFunction::execute(), SLIArrayModule::Gauss2dFunction::execute(), PclocksFunction::execute(), nest::Multimeter::Parameters_::get(), nest::correlomatrix_detector::State_::get(), nest::RecordingDevice::Parameters_::get(), nest::Connector< K, ConnectionT >::get_connections(), nest::Connector< 1, ConnectionT >::get_connections(), nest::Connector< K_cutoff, ConnectionT >::get_connections(), nest::RecordablesMap< nest::aeif_cond_alpha_RK5 >::get_list(), nest::ModelsModule::init(), Parser::operator()(), nest::MsgHandler::operator()(), nest::Network::random_divergent_connect(), nest::Multimeter::Parameters_::set(), SLIStartup::SLIStartup(), nest::ConnectionID::to_ArrayDatum(), DictionaryStack::toArray(), and TypeTrie::TypeNode::toTokenArray().
|
inline |
References clone(), data, and TokenArrayObj::push_back_move().
|
inline |
References data, and TokenArrayObj::push_back_move().
|
inline |
References clone(), data, and TokenArrayObj::push_back_move().
Referenced by FilesystemModule::FileNamesFunction::execute(), RegexpModule::RegexecFunction::execute(), SLIArrayModule::ArraystoreFunction::execute(), SLIArrayModule::ArraycreateFunction::execute(), SLIArrayModule::FlattenFunction::execute(), Cva_dFunction::execute(), and KeysFunction::execute().
|
inline |
References clone(), data, TokenArrayObj::reduce(), and size().
|
inline |
References data, and TokenArrayObj::references().
Referenced by assign_move(), SLIArrayModule::ArrayloadFunction::execute(), and SLIArrayModule::FlattenFunction::execute().
|
inline |
References clone(), data, and TokenArrayObj::replace_move().
|
inline |
Reserve space such that after the call the new capacity is n.
Returns true, if the container was reallocated. In this case all existing pointers are invalidated.
References data, and TokenArrayObj::reserve().
Referenced by __pyx_f_12pynestkernel_python_object_to_datum(), __pyx_pf_12pynestkernel_10NESTEngine_12push_connection_datums(), Get_a_aFunction::execute(), nest::TopologyModule::GetGlobalChildren_i_M_aFunction::execute(), SLIArrayModule::ArraystoreFunction::execute(), SLIArrayModule::ArraycreateFunction::execute(), RandomNumbers::RandomArrayFunction::execute(), SLIArrayModule::FlattenFunction::execute(), SLIArrayModule::TransposeFunction::execute(), SLIArrayModule::PartitionFunction::execute(), nest::NestModule::GetNodes_i_D_b_bFunction::execute(), Cva_dFunction::execute(), nest::NestModule::GetLeaves_i_D_bFunction::execute(), nest::NestModule::GetChildren_i_D_bFunction::execute(), SLIArrayModule::AreaFunction::execute(), nest::NestModule::GetStatus_aFunction::execute(), SLIArrayModule::Area2Function::execute(), SLIArrayModule::GaborFunction::execute(), and SLIArrayModule::Gauss2dFunction::execute().
Resizes the container to size s.
If the new size is larger than the old size, the new space is initialized with t.
References clone(), data, and TokenArrayObj::resize().
|
inline |
References nest::names::b, begin(), clone(), numerics::e, end(), and size().
Referenced by SLIArrayModule::ReverseFunction::execute().
References nest::names::b, TokenArrayObj::begin(), clone(), data, and TokenArrayObj::rotate().
Referenced by SLIArrayModule::RotateFunction::execute().
|
inline |
Reduce allocated space such that size()==capacity().
Returns true if the array was resized and false otherwhise. If true is returned, all existing pointers into the array are invalidated.
References data, and TokenArrayObj::shrink().
|
inline |
Return number of elements in the array.
References data, and TokenArrayObj::size().
Referenced by __pyx_f_12pynestkernel_sli_array_to_object(), array2vector(), nest::Network::convergent_connect(), nest::AbstractLayer::create_layer(), nest::Network::divergent_connect(), nest::Layer< D >::dump_connections(), empty(), erase(), Get_aFunction::execute(), AddtotrieFunction::execute(), Get_a_aFunction::execute(), SLIArrayModule::IMapFunction::execute(), SLIgraphics::WritePGMFunction::execute(), SLIArrayModule::MapThreadFunction::execute(), SLIArrayModule::IMapThreadFunction::execute(), SLIArrayModule::IMapIndexedFunction::execute(), SLIArrayModule::ArrayloadFunction::execute(), SLIArrayModule::FlattenFunction::execute(), SLIArrayModule::TransposeFunction::execute(), SLIArrayModule::PartitionFunction::execute(), SLIArrayModule::Put_a_a_tFunction::execute(), RestoredstackFunction::execute(), nest::NestModule::GetStatus_aFunction::execute(), Forallindexed_aFunction::execute(), Processes::Sysexec_aFunction::execute(), nest::NestModule::SetStatus_aaFunction::execute(), Search_aFunction::execute(), nest::MsgHandler::get_status(), nest::GIDCollection::GIDCollection(), TypeTrie::newnode(), nest::Scheduler::prepare_nodes(), nest::Network::random_convergent_connect(), nest::Network::random_divergent_connect(), reduce(), reverse(), rotate(), nest::FreeLayer< D >::set_status(), setValue< std::valarray< double > >(), setValue< std::valarray< long > >(), setValue< std::vector< double > >(), setValue< std::vector< long > >(), TypeTrie::TypeNode::toTokenArray(), toValarray(), and toVector().
|
inline |
void TokenArray::toValarray | ( | std::valarray< long > & | a | ) | const |
References begin(), nest::names::d, end(), GenericDatum< D, slt >::get(), Datum::gettypename(), size(), and Name::toString().
void TokenArray::toValarray | ( | std::valarray< double > & | a | ) | const |
References begin(), nest::names::d, end(), GenericDatum< D, slt >::get(), Datum::gettypename(), size(), and Name::toString().
void TokenArray::toVector | ( | std::vector< size_t > & | a | ) | const |
Fill vectors with homogenous integer and double arrays.
References begin(), nest::names::d, end(), GenericDatum< D, slt >::get(), Datum::gettypename(), size(), and Name::toString().
Referenced by nest::Network::divergent_connect(), SLIArrayModule::SortFunction::execute(), getValue< std::vector< double > >(), and getValue< std::vector< long > >().
void TokenArray::toVector | ( | std::vector< long > & | a | ) | const |
References begin(), nest::names::d, end(), GenericDatum< D, slt >::get(), Datum::gettypename(), size(), and Name::toString().
void TokenArray::toVector | ( | std::vector< double > & | a | ) | const |
References begin(), nest::names::d, end(), GenericDatum< D, slt >::get(), Datum::gettypename(), size(), and Name::toString().
void TokenArray::toVector | ( | std::vector< std::string > & | a | ) | const |
References begin(), nest::names::d, end(), Datum::gettypename(), size(), nest::names::target, and Name::toString().
bool TokenArray::valid | ( | void | ) | const |
References data, and TokenArrayObj::valid().
|
friend |
|
friend |
|
private |
Referenced by append_move(), assign_move(), begin(), capacity(), clone(), detach(), end(), erase(), get(), index_is_valid(), insert_move(), operator TokenArrayObj(), operator=(), operator==(), operator[](), pop_back(), push_back(), push_back_dont_clone(), push_back_move(), reduce(), references(), replace_move(), reserve(), resize(), rotate(), shrink(), size(), swap(), TokenArray(), valid(), and ~TokenArray().