next up previous contents
Next: Point Geometry Up: Geometrical Primitives Previous: Geometrical Primitives   Contents

Scalar

For completeness the scalar geometric type is included. It is defined by the following data structure.

typedef struct scalar
{
    Ts_id ts_id;                /* Tina structure identifier */
     unsigned int type;
     unsigned int label;
     float val;
     struct list *props;
} Scalar;

While this primitive does not represent physical geometry it can be used for scalar properties of geometry Eg length, radius, etc). It is used in the Geomstat package for this purpose.

Scalar *scalar_alloc(unsigned int type)

Scalar *scalar_make(double val, int type)

void    scalar_free(Scalar * scalar)

Scalar *scalar_copy(Scalar * scalar)

int     scalar_number(List * scalars)

void    scalar_format(Scalar * scalar)

Functions for manipulating scalars. The functions scalar_copy and scalar_free copy and free the property list see proplist description for details). scalar_format produces a standard formatted output of scalar using standard Tina format facility. Usually directed to the top level text display window.


next up previous contents
Next: Point Geometry Up: Geometrical Primitives Previous: Geometrical Primitives   Contents
root 2017-09-25