BMatrix

BMatrix — Base class for two-dimensional array data objects.

Functions

BMatrixSize b_matrix_get_size ()
unsigned int b_matrix_get_rows ()
unsigned int b_matrix_get_columns ()
const double * b_matrix_get_values ()
double b_matrix_get_value ()
char * b_matrix_get_str ()
void b_matrix_get_minmax ()
double * b_matrix_replace_cache ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── BData
            ╰── BMatrix
                ├── BRingMatrix
                ╰── BValMatrix

Description

Abstract base class for data classes representing two dimensional arrays.

Functions

b_matrix_get_size ()

BMatrixSize
b_matrix_get_size (BMatrix *mat);

Get the size of a BMatrix.

[skip]

Parameters

mat

BMatrix

 

Returns

the matrix size


b_matrix_get_rows ()

unsigned int
b_matrix_get_rows (BMatrix *mat);

Get the number of rows in a BMatrix.

Parameters

mat

BMatrix

 

Returns

the number of rows in mat


b_matrix_get_columns ()

unsigned int
b_matrix_get_columns (BMatrix *mat);

Get the number of columns in a BMatrix.

Parameters

mat

BMatrix

 

Returns

the number of columns in mat


b_matrix_get_values ()

const double *
b_matrix_get_values (BMatrix *mat);

Get the array of values of mat .

Parameters

mat

BMatrix

 

Returns

an array.


b_matrix_get_value ()

double
b_matrix_get_value (BMatrix *mat,
                    unsigned int i,
                    unsigned int j);

Get a value in mat .

Parameters

mat

BMatrix

 

i

row

 

j

column

 

Returns

the value


b_matrix_get_str ()

char *
b_matrix_get_str (BMatrix *mat,
                  unsigned int i,
                  unsigned int j,
                  const gchar *format);

Get a string representation of a value in mat .

Parameters

mat

BMatrix

 

i

row

 

j

column

 

format

a format string

 

Returns

the string


b_matrix_get_minmax ()

void
b_matrix_get_minmax (BMatrix *mat,
                     double *min,
                     double *max);

Get the minimum and maximum values in mat .

Parameters

mat

BMatrix

 

min

return location for minimum value, or NULL .

[out][nullable]

max

return location for maximum value, or NULL .

[out][nullable]

b_matrix_replace_cache ()

double *
b_matrix_replace_cache (BMatrix *mat,
                        unsigned int len);

Frees old cache and replaces it with newly allocated memory, of length len . Used by subclasses of BMatrix.

Parameters

mat

BMatrix

 

len

new length of cache

 

Returns

Pointer to the new cache.

Types and Values

BMatrixSize

typedef struct {
  unsigned int rows;
  unsigned int columns;
} BMatrixSize;

Holds the size of a matrix.

Members

unsigned int rows;

rows number, includes missing values.

 

unsigned int columns;

columns number, includes missing values.

 

struct BMatrixClass

struct BMatrixClass {
  BDataClass base;

  BMatrixSize(*load_size) (BMatrix * vec);
  double *(*load_values) (BMatrix * vec);
  double (*get_value) (BMatrix * mat, unsigned int i, unsigned int j);
  double *(*replace_cache) (BMatrix *mat, unsigned int len);
};

Class for BMatrix.

Members

BDataClass base;

base class.

 

load_size ()

loads the matrix length.

 

load_values ()

loads the values in the cache.

 

get_value ()

gets a value.

 

replace_cache ()

replaces array cache

 

BMatrix

typedef struct _BMatrix BMatrix;

Object representing a two-dimensional array of numbers.