VisuNodeValuesFarray

VisuNodeValuesFarray — define a VisuNodeValues object to handle any array of floats.

Functions

Properties

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuNodeValues
            ╰── VisuNodeValuesFarray
                ├── VisuNodeValuesVector
                ├── VisuNodeValuesCoord
                ╰── VisuNodeValuesPole

Description

Defines a VisuNodeValues object to store floating point arrays on every nodes and get notification for them.

Functions

VisuNodeValuesFarrayNrm2 ()

gfloat
(*VisuNodeValuesFarrayNrm2) (const VisuNodeValuesFarray *vect,
                             const GValue *value);

Prototype of method used to compute the square norm of value .

Parameters

vect

a VisuNodeValuesFarray object.

 

value

a value.

 

Since: 3.8


visu_node_values_farray_new ()

VisuNodeValuesFarray *
visu_node_values_farray_new (VisuNodeArray *arr,
                             const gchar *label,
                             guint dimension);

Create a new farray field located on nodes, storing dimension floats per node.

Parameters

arr

a VisuNodeArray object.

 

label

a translatable label.

 

dimension

a integer value.

 

Returns

a newly created VisuNodeValuesFarray object.

[transfer full]

Since: 3.8


visu_node_values_farray_new_fromFile ()

VisuNodeValuesFarray *
visu_node_values_farray_new_fromFile (VisuNodeArray *arr,
                                      const gchar *label,
                                      const gchar *filename,
                                      GError **error);

Parse filename to read floating point values and creates a new VisuNodeValuesFarray object based on arr . If an error occurs, an empty VisuNodeValuesFarray object is created.

Parameters

arr

a VisuNodeArray object.

 

label

a label.

 

filename

a filename.

 

error

an error location.

 

Returns

a newly created VisuNodeValuesFarray object.

[transfer full]

Since: 3.8


visu_node_values_farray_min ()

gfloat
visu_node_values_farray_min (VisuNodeValuesFarray *vect);

Computes and returns the smallest farray in the field.

Parameters

vect

a VisuNodeValuesFarray object.

 

Returns

the minimum farray norm.

Since: 3.8


visu_node_values_farray_max ()

gfloat
visu_node_values_farray_max (VisuNodeValuesFarray *vect);

Computes and returns the longest farray in the field.

Parameters

vect

a VisuNodeValuesFarray object.

 

Returns

the maximum farray norm.

Since: 3.8


visu_node_values_farray_nrm2 ()

gfloat
visu_node_values_farray_nrm2 (VisuNodeValuesFarray *vect);

Computes and returns the sum of square norm all farrays in the field.

Parameters

vect

a VisuNodeValuesFarray object.

 

Returns

the square norm of the farray field.

Since: 3.8


visu_node_values_farray_getColumnMinMax ()

gboolean
visu_node_values_farray_getColumnMinMax
                               (VisuNodeValuesFarray *vect,
                                float minMax[2],
                                guint column);

This method is used to retrieve the minimum and the maximum values of the column designed by the column argument. Column are numbered beginning at 0.

Parameters

vect

the VisuNodeValuesFarray object.

 

minMax

an allocated array of two floating point values ;.

[array fixed-size=2][out]

column

an integer.

 

Returns

FALSE if column < 0 or if column is greater than the number of read column or if no file has been set.


visu_node_values_farray_getAt ()

const gfloat *
visu_node_values_farray_getAt (VisuNodeValuesFarray *vect,
                               const VisuNode *node);

Retrieves the float array hosted on node .

Parameters

vect

a VisuNodeValuesFarray object.

 

node

a VisuNode object.

 

Returns

the coordinates of float array for node .

[transfer none]

Since: 3.8


visu_node_values_farray_getFloatAtIter ()

gfloat
visu_node_values_farray_getFloatAtIter
                               (const VisuNodeValuesFarray *vect,
                                const VisuNodeValuesIter *iter,
                                guint column);

Retrieves the float value stored for the current iteration of iter for the column column . iter must be running on vect .

Parameters

vect

a VisuNodeValuesFarray object.

 

iter

a VisuNodeValuesIter object.

 

column

a column id.

 

Returns

a float value.

Since: 3.8


visu_node_values_farray_setAt ()

gboolean
visu_node_values_farray_setAt (VisuNodeValuesFarray *vect,
                               const VisuNode *node,
                               const float *vals,
                               guint ln);

Changes the float array hosted at node for one of values defined by vals .

Parameters

vect

a VisuNodeValuesFarray object.

 

node

a VisuNode object.

 

vals

farray coordinates.

[array length=ln]

ln

a length.

 

Returns

TRUE if farray for node is indeed changed.

Since: 3.8


visu_node_values_farray_setAtDbl ()

gboolean
visu_node_values_farray_setAtDbl (VisuNodeValuesFarray *vect,
                                  const VisuNode *node,
                                  const double *vals,
                                  guint ln);

Same as visu_node_values_farray_setAt() but for double values.

Parameters

vect

a VisuNodeValuesFarray object.

 

node

a VisuNode object.

 

vals

farray coordinates.

[array fixed-size=3]

ln

a length.

 

Returns

TRUE if farray for node is indeed changed.

Since: 3.8


visu_node_values_farray_set ()

gboolean
visu_node_values_farray_set (VisuNodeValuesFarray *vect,
                             const GArray *data);

Assigns the coordinates stored in data to each nodes in vect .

Parameters

vect

a VisuNodeValuesFarray object.

 

data

some farray coordinates.

[element-type float]

Returns

TRUE if data has the same size as vect .

Since: 3.8


visu_node_values_farray_scale ()

void
visu_node_values_farray_scale (VisuNodeValuesFarray *vect,
                               gfloat factor);

Multiply every element of vect by factor .

Parameters

vect

a VisuNodeValuesFarray object.

 

factor

a factor.

 

Since: 3.8


visu_node_values_farray_getFile ()

const gchar *
visu_node_values_farray_getFile (const VisuNodeValuesFarray *vect);

Retrieve the filename from which the values have been read, if any.

Parameters

vect

a VisuNodeValuesFarray object.

 

Returns

a filename.

Since: 3.8

Types and Values

struct VisuNodeValuesFarray

struct VisuNodeValuesFarray;

Common name to refer to a _VisuNodeValuesFarray.


struct VisuNodeValuesFarrayClass

struct VisuNodeValuesFarrayClass {
  VisuNodeValuesClass parent;

  VisuNodeValuesFarrayNrm2 nrm2;
};

Common name to refer to a _VisuNodeValuesFarrayClass.

Members

VisuNodeValuesClass parent;

private.

 

VisuNodeValuesFarrayNrm2 nrm2;

the function used to compute the squared norm of the float array.

 

Property Details

The “data-min-max” property

  “data-min-max”             GArray *

min / max values of data.

Flags: Read


The “maximum” property

  “maximum”                  gfloat

maximum norm.

Flags: Read

Allowed values: >= 0

Default value: 0


The “minimum” property

  “minimum”                  gfloat

minimum norm.

Flags: Read

Allowed values: >= 0

Default value: 0


The “source-file” property

  “source-file”              gchar *

Source file if any.

Flags: Read

Default value: NULL


The “square-norm” property

  “square-norm”              gfloat

Square norm.

Flags: Read

Allowed values: >= 0

Default value: 0