![]() |
![]() |
![]() |
liboscats Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum OscatsDimType; typedef OscatsDim; typedef OscatsNatural; struct OscatsSpace; GType oscats_space_get_type (); guint16 oscats_space_size (const OscatsSpace *space
); void oscats_space_set_dim_name (OscatsSpace *space
,OscatsDim dim
,const gchar *name
); gboolean oscats_space_has_dim (const OscatsSpace *space
,GQuark name
); gboolean oscats_space_has_dim_name (const OscatsSpace *space
,const gchar *name
); OscatsDim oscats_space_get_dim (const OscatsSpace *space
,GQuark name
); OscatsDim oscats_space_get_dim_by_name (const OscatsSpace *space
,const gchar *name
); const gchar * oscats_space_dim_get_name (const OscatsSpace *space
,OscatsDim dim
); OscatsNatural oscats_space_dim_get_max (const OscatsSpace *space
,OscatsDim dim
); gboolean oscats_space_validate (const OscatsSpace *space
,OscatsDim dim
,OscatsNatural x
); gboolean oscats_space_compatible (const OscatsSpace *lhs
,const OscatsSpace *rhs
);
"id" gchar* : Read / Write / Construct Only "max" GValueArray* : Read / Write "names" GValueArray* : Read / Write "numBin" guint : Read / Write / Construct Only "numCont" guint : Read / Write / Construct Only "numNat" guint : Read / Write / Construct Only
A multidimensional latent space consisting of continuos-, binary- (0, 1), and natural- (0, 1, 2, ...) valued dimensions.
typedef enum { OSCATS_DIM_CONT = (1 << 14), OSCATS_DIM_BIN = (2 << 14), OSCATS_DIM_NAT = (3 << 14), OSCATS_DIM_TYPE_MASK = (3 << 14), OSCATS_DIM_MASK = 0x3fff, OSCATS_DIM_MAX = 0x3fff // == 16383 } OscatsDimType;
A latent space is composed of three types of dimensions: continuous-valued dimensions, binary-valued (0, 1) dimensions, and natural-valued (0, 1, 2, ...) dimensions. An OscatsDim encodes both the type and the dimension number.
typedef guint16 OscatsDim;
Index for a dimension in a latent space. Encodes both the type and dimension number.
typedef guint16 OscatsNatural;
A natural value (0, 1, 2, ...). This is simply an alias for guint16.
guint16 oscats_space_size (const OscatsSpace *space
);
|
an OscatsSpace |
Returns : |
the total number of dimensions |
void oscats_space_set_dim_name (OscatsSpace *space
,OscatsDim dim
,const gchar *name
);
Sets the name of dim
to name
. The dim
must be valid.
|
an OscatsSpace |
|
the dimension to set |
|
the new name for the dimension. [transfer none] |
gboolean oscats_space_has_dim (const OscatsSpace *space
,GQuark name
);
|
an OscatsSpace |
|
the GQuark for a potential dimension name |
Returns : |
TRUE if space has a dimension named name
|
gboolean oscats_space_has_dim_name (const OscatsSpace *space
,const gchar *name
);
|
an OscatsSpace |
|
a potential dimension name |
Returns : |
TRUE if space has a dimension named name
|
OscatsDim oscats_space_get_dim (const OscatsSpace *space
,GQuark name
);
The space
must have a dimension named name
.
|
an OscatsSpace |
|
the GQuark for a potential dimension name |
Returns : |
the OscatsDim for the dimension named name
|
OscatsDim oscats_space_get_dim_by_name (const OscatsSpace *space
,const gchar *name
);
The space
must have a dimension named name
.
|
an OscatsSpace |
|
a potential dimension name |
Returns : |
the OscatsDim for the dimension named name
|
const gchar * oscats_space_dim_get_name (const OscatsSpace *space
,OscatsDim dim
);
The dim
must be a valid dimension for space
.
|
an OscatsSpace |
|
an OscatsDim indicating the dimension |
Returns : |
the name for dim in space . [transfer none]
|
OscatsNatural oscats_space_dim_get_max (const OscatsSpace *space
,OscatsDim dim
);
The dim
must be a valid natural dimension for space
.
|
an OscatsSpace |
|
an OscatsDim indicating the dimension |
Returns : |
the maximum value for natural dimension dim in space
|
gboolean oscats_space_validate (const OscatsSpace *space
,OscatsDim dim
,OscatsNatural x
);
gboolean oscats_space_compatible (const OscatsSpace *lhs
,const OscatsSpace *rhs
);
Tests whether two spaces have the same geometry---that is, the same number of each type of dimension. For natural-valued dimensions, both spaces must also have the same range for each dimension. Note: This does not compare dimension names.
|
an OscatsSpace |
|
an OscatsSpace |
Returns : |
TRUE if lhs and rhs have the same geometry |
"id"
property"id" gchar* : Read / Write / Construct Only
A string identifier for the space.
Default value: NULL
"max"
property"max" GValueArray* : Read / Write
The maximum for each natural dimension. May be 1, though binary
dimensions should probably use OSCATS_DIM_BIN
instead.
"names"
property"names" GValueArray* : Read / Write
Dimension names. Names are ordered continuous dimensions first, followed by binary dimensions, followed by natural dimensions. Default names are Cont.1, Cont.2, ..., Bin.1, Bin.2, ..., Nat.1, Nat.2, ....
"numBin"
property"numBin" guint : Read / Write / Construct Only
The number of binary dimensions in the space.
Allowed values: <= 16383
Default value: 0
"numCont"
property"numCont" guint : Read / Write / Construct Only
The number of continuous dimensions in the space.
Allowed values: <= 16383
Default value: 0
"numNat"
property"numNat" guint : Read / Write / Construct Only
The number of natural (0, 1, 2, ...) dimensions in the space.
Allowed values: <= 16383
Default value: 0