Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

octave_map Class Reference

#include "oct-map.h"

Collaboration diagram for octave_map:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
octave_fields::const_iterator 
const_iterator
typedef octave_scalar_map element_type
typedef const_iterator iterator

Public Member Functions

 octave_map (const octave_fields &k)
 octave_map (const dim_vector &dv, const octave_fields &k)
 octave_map (const dim_vector &dv)
 octave_map (const octave_scalar_map &m)
 octave_map (const Octave_map &m)
 octave_map (const string_vector &k)
 octave_map (void)
 octave_map (const dim_vector &dv, const string_vector &k)
 octave_map (const octave_map &m)
void assign (const octave_value_list &, const octave_map &rhs)
void assign (const octave_value_list &idx, const std::string &k, const Cell &rhs)
void assign (const std::string &k, const Cell &val)
void assign (const idx_vector &i, const octave_map &rhs)
void assign (const idx_vector &i, const idx_vector &j, const octave_map &rhs)
void assign (const Array< idx_vector > &ia, const octave_map &rhs)
const_iterator begin (void) const
octave_scalar_map checkelem (octave_idx_type n) const
octave_scalar_map checkelem (octave_idx_type i, octave_idx_type j) const
octave_scalar_map checkelem (const Array< octave_idx_type > &ra_idx) const
void clear (void)
octave_idx_type cols (void) const
octave_map column (octave_idx_type k) const
octave_idx_type columns (void) const
octave_map concat (const octave_map &rb, const Array< octave_idx_type > &ra_idx)
bool contains (const std::string &name) const
Cellcontents (iterator p)
const Cellcontents (const_iterator p) const
Cell contents (const std::string &k) const
Cellcontents (const std::string &k)
const Cellcontents (octave_idx_type i) const
Cellcontents (octave_idx_type i)
void del (const std::string &k)
void delete_elements (const Array< idx_vector > &ia)
void delete_elements (const idx_vector &i)
void delete_elements (const octave_value_list &)
void delete_elements (int dim, const idx_vector &i)
dim_vector dims (void) const
const_iterator end (void) const
octave_scalar_map fast_elem_extract (octave_idx_type n) const
bool fast_elem_insert (octave_idx_type n, const octave_scalar_map &rhs)
string_vector fieldnames (void) const
Cell getfield (const std::string &key) const
octave_map index (const idx_vector &i, bool resize_ok=false) const
octave_map index (const idx_vector &i, const idx_vector &j, bool resize_ok=false) const
octave_map index (const Array< idx_vector > &ia, bool resize_ok=false) const
octave_map index (const octave_value_list &, bool resize_ok=false) const
octave_idx_type index (const_iterator p) const
bool is_empty (void) const
bool isfield (const std::string &name) const
std::string key (const_iterator p) const
string_vector keys (void) const
octave_idx_type length (void) const
int ndims (void) const
octave_idx_type nfields (void) const
octave_idx_type numel (void) const
octave_scalar_map operator() (const Array< octave_idx_type > &ra_idx) const
octave_scalar_map operator() (octave_idx_type i, octave_idx_type j) const
octave_scalar_map operator() (octave_idx_type n) const
octave_mapoperator= (const octave_map &m)
octave_map orderfields (const octave_map &other, Array< octave_idx_type > &perm) const
octave_map orderfields (void) const
octave_map orderfields (Array< octave_idx_type > &perm) const
octave_map page (octave_idx_type k) const
octave_map permute (const Array< int > &vec, bool inv=false) const
octave_map reshape (const dim_vector &dv) const
void resize (const dim_vector &dv, bool fill=false)
void rmfield (const std::string &key)
octave_idx_type rows (void) const
const_iterator seek (const std::string &k) const
void setfield (const std::string &key, const Cell &val)
octave_map squeeze (void) const
octave_map transpose (void) const

Static Public Member Functions

static octave_map cat (int dim, octave_idx_type n, const octave_scalar_map *map_list)
static octave_map cat (int dim, octave_idx_type n, const octave_map *map_list)

Private Member Functions

void extract_scalar (octave_scalar_map &dest, octave_idx_type index) const
void optimize_dimensions (void)

Static Private Member Functions

static void do_cat (int dim, octave_idx_type n, const octave_scalar_map *map_list, octave_map &retval)
static void do_cat (int dim, octave_idx_type n, const octave_map *map_list, octave_map &retval)

Private Attributes

dim_vector dimensions
octave_fields xkeys
std::vector< Cellxvals

Detailed Description

Definition at line 261 of file oct-map.h.


Member Typedef Documentation

Definition at line 302 of file oct-map.h.

Definition at line 272 of file oct-map.h.

Definition at line 303 of file oct-map.h.


Constructor & Destructor Documentation

octave_map::octave_map ( const octave_fields k  )  [inline]

Definition at line 266 of file oct-map.h.

octave_map::octave_map ( const dim_vector dv,
const octave_fields k 
) [inline]

Definition at line 269 of file oct-map.h.

octave_map::octave_map ( void   )  [inline]

Definition at line 274 of file oct-map.h.

octave_map::octave_map ( const dim_vector dv  )  [inline]

Definition at line 276 of file oct-map.h.

octave_map::octave_map ( const string_vector k  )  [inline]

Definition at line 278 of file oct-map.h.

octave_map::octave_map ( const dim_vector dv,
const string_vector k 
) [inline]

Definition at line 281 of file oct-map.h.

octave_map::octave_map ( const octave_map m  )  [inline]

Definition at line 284 of file oct-map.h.

octave_map::octave_map ( const octave_scalar_map m  ) 

Definition at line 242 of file oct-map.cc.

References dimensions, octave_scalar_map::nfields(), octave_scalar_map::xvals, and xvals.

octave_map::octave_map ( const Octave_map m  ) 

Definition at line 254 of file oct-map.cc.

References begin(), Octave_map::contents(), contents(), end(), key(), and optimize_dimensions().


Member Function Documentation

void octave_map::assign ( const std::string &  k,
const Cell val 
) [inline]
void octave_map::assign ( const idx_vector i,
const octave_map rhs 
)
void octave_map::assign ( const idx_vector i,
const idx_vector j,
const octave_map rhs 
)
void octave_map::assign ( const Array< idx_vector > &  ia,
const octave_map rhs 
)
void octave_map::assign ( const octave_value_list idx,
const octave_map rhs 
)

Definition at line 1095 of file oct-map.cc.

References assign(), error_state, and octave_value_list::length().

void octave_map::assign ( const octave_value_list idx,
const std::string &  k,
const Cell rhs 
)
const_iterator octave_map::begin ( void   )  const [inline]
octave_map octave_map::cat ( int  dim,
octave_idx_type  n,
const octave_scalar_map map_list 
) [static]
octave_map octave_map::cat ( int  dim,
octave_idx_type  n,
const octave_map map_list 
) [static]
octave_scalar_map octave_map::checkelem ( octave_idx_type  n  )  const
octave_scalar_map octave_map::checkelem ( octave_idx_type  i,
octave_idx_type  j 
) const

Definition at line 374 of file oct-map.cc.

References compute_index(), dimensions, extract_scalar(), and xkeys.

octave_scalar_map octave_map::checkelem ( const Array< octave_idx_type > &  ra_idx  )  const

Definition at line 385 of file oct-map.cc.

References compute_index(), dimensions, extract_scalar(), and xkeys.

void octave_map::clear ( void   )  [inline]

Definition at line 366 of file oct-map.h.

Referenced by DEFUN().

octave_idx_type octave_map::cols ( void   )  const [inline]

Definition at line 378 of file oct-map.h.

octave_map octave_map::column ( octave_idx_type  k  )  const

Definition at line 952 of file oct-map.cc.

References idx_vector::colon, and index().

octave_idx_type octave_map::columns ( void   )  const [inline]

Definition at line 379 of file oct-map.h.

octave_map octave_map::concat ( const octave_map rb,
const Array< octave_idx_type > &  ra_idx 
)
bool octave_map::contains ( const std::string &  name  )  const [inline]
Cell& octave_map::contents ( iterator  p  )  [inline]

Definition at line 318 of file oct-map.h.

const Cell& octave_map::contents ( octave_idx_type  i  )  const [inline]

Definition at line 321 of file oct-map.h.

Cell& octave_map::contents ( octave_idx_type  i  )  [inline]

Definition at line 324 of file oct-map.h.

Cell octave_map::contents ( const std::string &  k  )  const

Definition at line 339 of file oct-map.cc.

References getfield().

Cell & octave_map::contents ( const std::string &  k  ) 

Definition at line 345 of file oct-map.cc.

References dimensions, octave_fields::getfield(), xkeys, and xvals.

const Cell& octave_map::contents ( const_iterator  p  )  const [inline]
void octave_map::del ( const std::string &  k  )  [inline]

Definition at line 354 of file oct-map.h.

void octave_map::delete_elements ( const octave_value_list idx  ) 

Definition at line 1241 of file oct-map.cc.

References delete_elements(), error_state, and octave_value_list::length().

void octave_map::delete_elements ( const idx_vector i  ) 
void octave_map::delete_elements ( const Array< idx_vector > &  ia  ) 
void octave_map::delete_elements ( int  dim,
const idx_vector i 
)
dim_vector octave_map::dims ( void   )  const [inline]

Definition at line 401 of file oct-map.h.

Referenced by concat(), DEFUN(), octave_class::octave_class(), and permute_to_correct_order1().

void octave_map::do_cat ( int  dim,
octave_idx_type  n,
const octave_scalar_map map_list,
octave_map retval 
) [static, private]

Definition at line 578 of file oct-map.cc.

References dimensions, nfields(), dim_vector::resize(), octave_scalar_map::xvals, and xvals.

Referenced by cat().

void octave_map::do_cat ( int  dim,
octave_idx_type  n,
const octave_map map_list,
octave_map retval 
) [static, private]

Definition at line 599 of file oct-map.cc.

References dimensions, nfields(), OCTAVE_LOCAL_BUFFER, and xvals.

const_iterator octave_map::end ( void   )  const [inline]
void octave_map::extract_scalar ( octave_scalar_map dest,
octave_idx_type  index 
) const [private]

Definition at line 354 of file oct-map.cc.

References nfields(), xvals, and octave_scalar_map::xvals.

Referenced by checkelem(), and fast_elem_extract().

octave_scalar_map octave_map::fast_elem_extract ( octave_idx_type  n  )  const

Definition at line 396 of file oct-map.cc.

References extract_scalar(), and xkeys.

bool octave_map::fast_elem_insert ( octave_idx_type  n,
const octave_scalar_map rhs 
)
string_vector octave_map::fieldnames ( void   )  const [inline]
Cell octave_map::getfield ( const std::string &  key  )  const

Definition at line 264 of file oct-map.cc.

References octave_fields::getfield(), xkeys, and xvals.

Referenced by contents().

octave_idx_type octave_map::index ( const_iterator  p  )  const [inline]
octave_map octave_map::index ( const octave_value_list idx,
bool  resize_ok = false 
) const

Definition at line 900 of file oct-map.cc.

References error_state, index(), and octave_value_list::length().

octave_map octave_map::index ( const idx_vector i,
bool  resize_ok = false 
) const
octave_map octave_map::index ( const idx_vector i,
const idx_vector j,
bool  resize_ok = false 
) const
octave_map octave_map::index ( const Array< idx_vector > &  ia,
bool  resize_ok = false 
) const
bool octave_map::is_empty ( void   )  const [inline]

Definition at line 375 of file oct-map.h.

Referenced by permute_to_correct_order1().

bool octave_map::isfield ( const std::string &  name  )  const [inline]

Definition at line 331 of file oct-map.h.

Referenced by DEFUN().

std::string octave_map::key ( const_iterator  p  )  const [inline]
string_vector octave_map::keys ( void   )  const [inline]
octave_idx_type octave_map::length ( void   )  const [inline]

Definition at line 374 of file oct-map.h.

int octave_map::ndims ( void   )  const [inline]

Definition at line 403 of file oct-map.h.

Referenced by transpose().

octave_idx_type octave_map::nfields ( void   )  const [inline]
octave_idx_type octave_map::numel ( void   )  const [inline]
octave_scalar_map octave_map::operator() ( octave_idx_type  n  )  const [inline]

Definition at line 388 of file oct-map.h.

octave_scalar_map octave_map::operator() ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]

Definition at line 390 of file oct-map.h.

octave_scalar_map octave_map::operator() ( const Array< octave_idx_type > &  ra_idx  )  const [inline]

Definition at line 394 of file oct-map.h.

octave_map& octave_map::operator= ( const octave_map m  )  [inline]

Definition at line 291 of file oct-map.h.

References dimensions, xkeys, and xvals.

void octave_map::optimize_dimensions ( void   )  [private]
octave_map octave_map::orderfields ( const octave_map other,
Array< octave_idx_type > &  perm 
) const
octave_map octave_map::orderfields ( void   )  const

Definition at line 297 of file oct-map.cc.

Referenced by assign(), and permute_to_correct_order1().

octave_map octave_map::orderfields ( Array< octave_idx_type > &  perm  )  const

Definition at line 304 of file oct-map.cc.

References nfields(), octave_fields::orderfields(), Array< T >::xelem(), xkeys, and xvals.

octave_map octave_map::page ( octave_idx_type  k  )  const

Definition at line 958 of file oct-map.cc.

References idx_vector::colon, and index().

octave_map octave_map::permute ( const Array< int > &  vec,
bool  inv = false 
) const
octave_map octave_map::reshape ( const dim_vector dv  )  const

Definition at line 519 of file oct-map.cc.

References dimensions, nfields(), optimize_dimensions(), Array< T >::reshape(), xkeys, and xvals.

Referenced by octave_class::reshape().

void octave_map::resize ( const dim_vector dv,
bool  fill = false 
)
void octave_map::rmfield ( const std::string &  key  ) 

Definition at line 289 of file oct-map.cc.

References octave_fields::rmfield(), xkeys, and xvals.

Referenced by DEFUN().

octave_idx_type octave_map::rows ( void   )  const [inline]

Definition at line 377 of file oct-map.h.

const_iterator octave_map::seek ( const std::string &  k  )  const [inline]
void octave_map::setfield ( const std::string &  key,
const Cell val 
)
octave_map octave_map::squeeze ( void   )  const

Definition at line 435 of file oct-map.cc.

References dimensions, nfields(), optimize_dimensions(), dim_vector::squeeze(), and xvals.

octave_map octave_map::transpose ( void   )  const

Definition at line 492 of file oct-map.cc.

References dimensions, ndims(), nfields(), optimize_dimensions(), xkeys, and xvals.


Member Data Documentation

std::vector<Cell> octave_map::xvals [private]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines