24 #if ! defined (octave_oct_map_h) 25 #define octave_oct_map_h 1 27 #include "octave-config.h" 68 if (--rep->
count == 0)
78 if (--rep->
count == 0)
91 if (--rep->
count == 0)
110 {
return rep->find (
k); }
141 {
return rep == other.
rep; }
158 : xkeys (
k), xvals (
k.nfields ()) { }
163 : xkeys (
k), xvals (
k.
numel ()) { }
166 : xkeys (m.xkeys), xvals (m.xvals) { }
190 {
return xkeys.key (
p); }
192 {
return xkeys.index (
p); }
195 {
return xvals[xkeys.index (
p)]; }
198 {
return xvals[xkeys.index (
p)]; }
211 {
return xkeys.isfield (
name); }
217 {
return xkeys.fieldnames (); }
262 {
return v.scalar_map_value (); }
270 : xkeys (
k), xvals (
k.nfields ()), dimensions () { }
273 : xkeys (
k), xvals (
k.nfields (),
Cell (
dv)), dimensions (
dv) { }
282 : xkeys (
k), xvals (
k.
numel (),
Cell (1, 1)), dimensions (1, 1) { }
288 : xkeys (m.xkeys), xvals (m.xvals), dimensions (m.dimensions) { }
313 {
return xkeys.key (
p); }
315 {
return xkeys.index (
p); }
318 {
return xvals[xkeys.index (
p)]; }
321 {
return xvals[xkeys.index (
p)]; }
334 {
return xkeys.isfield (
name); }
340 {
return xkeys.fieldnames (); }
377 bool isempty (
void)
const {
return dimensions.any_zero (); }
390 {
return elem (
i, j); }
406 {
return elem (
i, j); }
418 int ndims (
void)
const {
return dimensions.ndims (); }
435 bool resize_ok =
false)
const;
438 bool resize_ok =
false)
const;
458 void delete_elements (
int dim,
const idx_vector&
i);
479 void optimize_dimensions (
void);
490 {
return v.map_value (); }
string_vector fieldnames(void) const
octave_idx_type rows(void) const
octave_value & contents(iterator p)
octave_value & contents(octave_idx_type i)
octave_scalar_map element_type
octave_map(const dim_vector &dv)
OCTAVE_EXPORT octave_value_list column
bool contains(const std::string &name) const
Cell & contents(octave_idx_type i)
const_iterator begin(void) const
const octave_base_value const Array< octave_idx_type > & ra_idx
Cell & contents(iterator p)
string_vector keys(void) const
void assign(const std::string &k, const Cell &val)
octave_map(const string_vector &k)
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode fieldnames
string_vector fieldnames(void) const
identity matrix If supplied two scalar respectively For allows like xample val
const octave_value & contents(octave_idx_type i) const
octave_scalar_map checkelem(octave_idx_type n) const
OCTAVE_EXPORT octave_value_list page
std::string key(const_iterator p) const
octave_scalar_map checkelem(octave_idx_type i, octave_idx_type j) const
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)
const Cell & contents(octave_idx_type i) const
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
octave_idx_type nfields(void) const
std::string key(const_iterator p) const
const_iterator seek(const std::string &k) const
octave_map(const octave_fields &k)
octave_map(const octave_map &m)
bool isfield(const std::string &name) const
const_iterator end(void) const
octave_scalar_map(const octave_scalar_map &m)
std::vector< Cell > xvals
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode orderfields
octave_scalar_map octave_value_extract< octave_scalar_map >(const octave_value &v)
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode rmfield
string_vector keys(void) const
octave_idx_type index(const_iterator p) const
bool isfield(const std::string &name) const
bool contains(const std::string &name) const
std::vector< octave_value > xvals
nd deftypefn *std::string name
octave_map(const dim_vector &dv, const string_vector &k)
octave_fields::const_iterator const_iterator
octave_idx_type columns(void) const
const_iterator end(void) const
octave_map(const dim_vector &dv, const octave_fields &k)
const_iterator begin(void) const
const Cell & contents(const_iterator p) const
std::string key(const_iterator p) const
octave_idx_type numel(void) const
octave_scalar_map checkelem(const Array< octave_idx_type > &ra_idx) const
octave_idx_type cols(void) const
octave_idx_type nfields(void) const
const_iterator seek(const std::string &k) const
octave_fields(const octave_fields &o)
octave_scalar_map(const octave_fields &k)
T::size_type numel(const T &str)
const octave_value & contents(const_iterator p) const
bool is_same(const octave_fields &other) const
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode isfield
void del(const std::string &k)
octave_map octave_value_extract< octave_map >(const octave_value &v)
std::map< std::string, octave_idx_type >::const_iterator const_iterator
void assign(const std::string &k, const octave_value &val)
octave_idx_type index(const_iterator p) const
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode setfield
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode getfield
fields_rep(const fields_rep &other)
octave_idx_type index(const_iterator p) const
dim_vector dims(void) const
octave::refcount< int > count
octave_fields::const_iterator const_iterator
octave_idx_type length(void) const
octave_idx_type nfields(void) const
octave_scalar_map(const string_vector &k)
Vector representing the dimensions (size) of an Array.
const_iterator begin(void) const
const_iterator seek(const std::string &k) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void del(const std::string &k)
const_iterator end(void) const