GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
Array-util.cc File Reference
#include "Array-util.h"
#include "dim-vector.h"
#include "lo-error.h"
#include "oct-locbuf.h"
Include dependency graph for Array-util.cc:

Go to the source code of this file.

Classes

struct  sub2ind_helper
 

Functions

bool all_colon_equiv (const Array< idx_vector > &ra_idx, const dim_vector &frozen_lengths)
 
bool all_ok (const Array< idx_vector > &ra_idx)
 
bool all_ones (const Array< octave_idx_type > &arr)
 
bool any_ones (const Array< octave_idx_type > &arr)
 
bool any_orig_empty (const Array< idx_vector > &ra_idx)
 
octave_idx_type compute_index (octave_idx_type n, const dim_vector &dims)
 
octave_idx_type compute_index (octave_idx_type i, octave_idx_type j, const dim_vector &dims)
 
octave_idx_type compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k, const dim_vector &dims)
 
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx, const dim_vector &dims)
 
Array< idx_vectorconv_to_array (const idx_vector *tmp, const octave_idx_type len)
 
Array< octave_idx_typeconv_to_int_array (const Array< idx_vector > &a)
 
dim_vector freeze (Array< idx_vector > &ra_idx, const dim_vector &dimensions, int resize_ok)
 
Array< octave_idx_typeget_elt_idx (const Array< idx_vector > &ra_idx, const Array< octave_idx_type > &result_idx)
 
Array< octave_idx_typeget_ra_idx (octave_idx_type idx, const dim_vector &dims)
 
octave_idx_type get_scalar_idx (Array< octave_idx_type > &idx, dim_vector &dims)
 
void increment_index (Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension)
 
Array< idx_vectorind2sub (const dim_vector &dv, const idx_vector &idx)
 
bool index_in_bounds (const Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
 
bool is_scalar (const dim_vector &dim)
 
bool is_vector (const dim_vector &dim)
 
octave_idx_type num_ones (const Array< octave_idx_type > &ra_idx)
 
int permute_vector_compare (const void *a, const void *b)
 
idx_vector sub2ind (const dim_vector &dv, const Array< idx_vector > &idxa)
 
bool vector_equivalent (const dim_vector &dv)
 
dim_vector zero_dims_inquire (const Array< idx_vector > &ia, const dim_vector &rhdv)
 
dim_vector zero_dims_inquire (const idx_vector &i, const idx_vector &j, const dim_vector &rhdv)
 

Function Documentation

bool all_colon_equiv ( const Array< idx_vector > &  ra_idx,
const dim_vector frozen_lengths 
)

Definition at line 335 of file Array-util.cc.

References Array< T >::length(), dim_vector::length(), and ra_idx.

bool all_ok ( const Array< idx_vector > &  ra_idx)

Definition at line 297 of file Array-util.cc.

References Array< T >::length(), and ra_idx.

bool all_ones ( const Array< octave_idx_type > &  arr)

Definition at line 359 of file Array-util.cc.

References Array< T >::length().

bool any_ones ( const Array< octave_idx_type > &  arr)

Definition at line 161 of file Array-util.cc.

References Array< T >::length().

bool any_orig_empty ( const Array< idx_vector > &  ra_idx)

Definition at line 316 of file Array-util.cc.

References Array< T >::length(), and ra_idx.

octave_idx_type compute_index ( octave_idx_type  n,
const dim_vector dims 
)
octave_idx_type compute_index ( octave_idx_type  i,
octave_idx_type  j,
const dim_vector dims 
)
octave_idx_type compute_index ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k,
const dim_vector dims 
)
octave_idx_type compute_index ( const Array< octave_idx_type > &  ra_idx,
const dim_vector dims 
)
Array<idx_vector> conv_to_array ( const idx_vector tmp,
const octave_idx_type  len 
)

Definition at line 245 of file Array-util.cc.

Array<octave_idx_type> conv_to_int_array ( const Array< idx_vector > &  a)
dim_vector freeze ( Array< idx_vector > &  ra_idx,
const dim_vector dimensions,
int  resize_ok 
)
Array<octave_idx_type> get_elt_idx ( const Array< idx_vector > &  ra_idx,
const Array< octave_idx_type > &  result_idx 
)

Definition at line 376 of file Array-util.cc.

References Array< T >::length(), and ra_idx.

Array<octave_idx_type> get_ra_idx ( octave_idx_type  idx,
const dim_vector dims 
)
octave_idx_type get_scalar_idx ( Array< octave_idx_type > &  idx,
dim_vector dims 
)

Definition at line 80 of file Array-util.cc.

References Array< T >::length().

void increment_index ( Array< octave_idx_type > &  ra_idx,
const dim_vector dimensions,
int  start_dimension 
)
Array<idx_vector> ind2sub ( const dim_vector dv,
const idx_vector idx 
)
bool index_in_bounds ( const Array< octave_idx_type > &  ra_idx,
const dim_vector dimensions 
)

Definition at line 34 of file Array-util.cc.

References Array< T >::length(), dim_vector::length(), and ra_idx.

bool is_scalar ( const dim_vector dim)

Definition at line 115 of file Array-util.cc.

References dim_vector::length().

Referenced by cdef_object_array::subsasgn(), and cdef_object_array::subsref().

bool is_vector ( const dim_vector dim)

Definition at line 141 of file Array-util.cc.

References dim_vector::length().

octave_idx_type num_ones ( const Array< octave_idx_type > &  ra_idx)

Definition at line 101 of file Array-util.cc.

References Array< T >::length().

int permute_vector_compare ( const void *  a,
const void *  b 
)

Definition at line 652 of file Array-util.cc.

References permute_vector::pidx.

idx_vector sub2ind ( const dim_vector dv,
const Array< idx_vector > &  idxa 
)
bool vector_equivalent ( const dim_vector dv)

Definition at line 276 of file Array-util.cc.

References dim_vector::length().

dim_vector zero_dims_inquire ( const Array< idx_vector > &  ia,
const dim_vector rhdv 
)
dim_vector zero_dims_inquire ( const idx_vector i,
const idx_vector j,
const dim_vector rhdv 
)