GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave_fields Class Reference

#include "oct-map.h"

Public Types

typedef std::map< std::string, octave_idx_type >::const_iterator const_iterator
 
typedef const_iterator iterator
 

Public Member Functions

 octave_fields ()
 
 octave_fields (const char *const *)
 
 octave_fields (const octave_fields &o)
 
 octave_fields (const string_vector &)
 
 ~octave_fields ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
const_iterator end () const
 
bool equal_up_to_order (const octave_fields &other, Array< octave_idx_type > &perm) const
 
bool equal_up_to_order (const octave_fields &other, octave_idx_type *perm) const
 
string_vector fieldnames () const
 
octave_idx_type getfield (const std::string &name)
 
octave_idx_type getfield (const std::string &name) const
 
octave_idx_type index (const_iterator p) const
 
bool is_same (const octave_fields &other) const
 
bool isfield (const std::string &name) const
 
std::string key (const_iterator p) const
 
void make_unique ()
 
octave_idx_type nfields () const
 
octave_fieldsoperator= (const octave_fields &o)
 
void orderfields (Array< octave_idx_type > &perm)
 
octave_idx_type rmfield (const std::string &name)
 
const_iterator seek (const std::string &k) const
 

Detailed Description

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

Member Typedef Documentation

◆ const_iterator

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

◆ iterator

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

Constructor & Destructor Documentation

◆ octave_fields() [1/4]

octave_fields::octave_fields ( )
inline

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

◆ octave_fields() [2/4]

octave_fields::octave_fields ( const string_vector fields)

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

References n, and string_vector::numel().

◆ octave_fields() [3/4]

octave_fields::octave_fields ( const char *const *  fields)

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

References n.

◆ ~octave_fields()

octave_fields::~octave_fields ( )
inline

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

◆ octave_fields() [4/4]

octave_fields::octave_fields ( const octave_fields o)
inline

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

Member Function Documentation

◆ begin()

const_iterator octave_fields::begin ( ) const
inline

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

Referenced by octave_scalar_map::begin(), octave_map::begin(), and equal_up_to_order().

◆ cbegin()

const_iterator octave_fields::cbegin ( ) const
inline

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

◆ cend()

const_iterator octave_fields::cend ( ) const
inline

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

◆ clear()

void octave_fields::clear ( )
inline

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

◆ end()

const_iterator octave_fields::end ( ) const
inline

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

Referenced by equal_up_to_order().

◆ equal_up_to_order() [1/2]

bool octave_fields::equal_up_to_order ( const octave_fields other,
Array< octave_idx_type > &  perm 
) const

◆ equal_up_to_order() [2/2]

bool octave_fields::equal_up_to_order ( const octave_fields other,
octave_idx_type perm 
) const

◆ fieldnames()

string_vector octave_fields::fieldnames ( ) const

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

References n, nfields(), and string_vector::xelem().

◆ getfield() [1/2]

octave_idx_type octave_fields::getfield ( const std::string &  name)

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

References make_unique(), and n.

◆ getfield() [2/2]

◆ index()

octave_idx_type octave_fields::index ( const_iterator  p) const
inline

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

◆ is_same()

bool octave_fields::is_same ( const octave_fields other) const
inline

◆ isfield()

bool octave_fields::isfield ( const std::string &  name) const

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

◆ key()

std::string octave_fields::key ( const_iterator  p) const
inline

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

◆ make_unique()

void octave_fields::make_unique ( )
inline

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

References r.

Referenced by getfield(), orderfields(), and rmfield().

◆ nfields()

octave_idx_type octave_fields::nfields ( ) const
inline

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

Referenced by equal_up_to_order(), and fieldnames().

◆ operator=()

octave_fields& octave_fields::operator= ( const octave_fields o)
inline

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

◆ orderfields()

void octave_fields::orderfields ( Array< octave_idx_type > &  perm)

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

References Array< T, Alloc >::clear(), make_unique(), and n.

Referenced by octave_scalar_map::orderfields(), and octave_map::orderfields().

◆ rmfield()

octave_idx_type octave_fields::rmfield ( const std::string &  name)

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

References make_unique(), and n.

Referenced by octave_scalar_map::rmfield(), and octave_map::rmfield().

◆ seek()

const_iterator octave_fields::seek ( const std::string &  k) const
inline

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


The documentation for this class was generated from the following files: