cta_treevector.h File Reference

Interface description of the COSTA default tree-vector component. More...

#include "cta_system.h"
#include "cta_datatypes.h"
#include "cta_handles.h"
#include "cta_vector.h"
#include "cta_matrix.h"
#include "cta_metainfo.h"

Go to the source code of this file.

Typedefs

typedef CTA_Handle CTA_TreeVector

Functions

CTAEXPORT int CTA_TreeVector_Create (const char *name, const char *tag, CTA_TreeVector *treevec)
 Create a tree-vector.
CTAEXPORT int CTA_TreeVector_Duplicate (CTA_TreeVector treevec1, CTA_TreeVector *treevec2)
 Duplicate a tree-vector.
CTAEXPORT int CTA_TreeVector_Conc (CTA_TreeVector treevec1, CTA_TreeVector *treevecs, int ntreevecs)
 Define a tree-vector to be a concatination of other tree-vectors.
CTAEXPORT int CTA_TreeVector_GetSubTreeVec (CTA_TreeVector treevec, const char *tag, CTA_TreeVector *subtreevec)
 Get the handle of a sub-tree-vectors using its tag.
CTAEXPORT int CTA_TreeVector_GetSubTreeVecId (CTA_TreeVector treevec, int index, char tag[CTA_STRLEN_TAG])
 Get the tag of a sub-tree-vector using its index (starting with 0).
CTAEXPORT int CTA_TreeVector_GetSubTreeVecIndex (CTA_TreeVector treevec, int index, CTA_TreeVector *subtreevec)
 Get the handle of a first-layer sub-tree-vector using its index.
CTAEXPORT int CTA_TreeVector_GetNumSubTree (CTA_TreeVector treevec, int *numSubTrees)
 Get number of sub-treevectors.
CTAEXPORT int CTA_TreeVector_GetTag (CTA_TreeVector treevec, char *tag)
 Get the tag of the tree-vector.
CTAEXPORT int CTA_TreeVector_SetVec (CTA_TreeVector treevec, CTA_Vector hvec)
 Set the values of the tree-vector.
CTAEXPORT int CTA_TreeVector_GetVec (CTA_TreeVector treevec, CTA_Vector hvec)
 Get the values of the tree-vector.
CTAEXPORT int CTA_TreeVector_Axpy (CTA_TreeVector y, double alpha, CTA_TreeVector x)
 Axpy operation between two tree-vectors.
CTAEXPORT int CTA_TreeVector_Dot (CTA_TreeVector treevec1, CTA_TreeVector treevec2, double *dotprod)
 Compute dot product of two tree-vectors.
CTAEXPORT int CTA_TreeVector_Nrm2 (CTA_TreeVector treevec1, double *nrm2)
 Compute the 2-norm of a tree-vector.
CTAEXPORT int CTA_TreeVector_Copy (CTA_TreeVector treevec1, CTA_TreeVector treevec2)
 Copy a tree-vector.
CTAEXPORT int CTA_TreeVector_SetConstant (CTA_TreeVector treevec, void *val, CTA_Datatype datatype)
 Set whole tree-vector equal to a constant value.
CTAEXPORT int CTA_TreeVector_Scal (CTA_TreeVector treevec, double alpha)
 Scale tree-vector.
CTAEXPORT int CTA_TreeVector_SetVals (CTA_TreeVector treevec, void *val, int nval, CTA_Datatype datatype)
 Set all values of the tree-vector.
CTAEXPORT int CTA_TreeVector_GetVals (CTA_TreeVector treevec, void *val, int nval, CTA_Datatype datatype)
 Get all values of the tree-vector.
CTAEXPORT int CTA_TreeVector_SetVal (CTA_TreeVector treevec, int i, void *val, CTA_Datatype datatype)
 Set single value of the tree-vector.
CTAEXPORT int CTA_TreeVector_GetVal (CTA_TreeVector treevec, int i, void *val, CTA_Datatype datatype)
 Get single value of the tree-vector.
CTAEXPORT int CTA_TreeVector_GetSize (CTA_TreeVector treevec, int *n)
 Get size of tree-vector.
CTAEXPORT int CTA_TreeVector_Export (CTA_TreeVector treevec, CTA_Handle usrdata)
 Export tree-vector.
CTAEXPORT int CTA_TreeVector_Import (CTA_TreeVector treevec, CTA_Handle usrdata)
 Import Tree-vector.
CTAEXPORT int CTA_TreeVector_VImport (CTA_TreeVector treevec, CTA_Handle usrdata)
 Import Tree-vector as flat vector.
CTAEXPORT int CTA_TreeVector_Free (CTA_TreeVector *treevec, int recursive)
 Free Tree-vector.
CTAEXPORT int CTA_TreeVector_Info (CTA_TreeVector treevec)
 Print tree-vector information.
CTAEXPORT int CTA_TreeVector_Gemm (CTA_TreeVector *sC, int nc, int transa, int transb, double alpha, CTA_TreeVector *sA, int na, CTA_Matrix mB, double beta)
 Perform the matrix multiplication C:=alpha*op(A)*op(B)+beta*C where op(X)=X, X^T. However C and A are matrices of wich the columns are tree-vectors.
CTAEXPORT void CTAI_XML_WriteTreeVec (CTA_TreeVector treevec, xmlTextWriter *writer)
 Generate XML from one COSTA tree-vector.
CTAEXPORT CTA_TreeVector CTAI_XML_CreateTreeVec (xmlNode *cur_node)
 Create a COSTA tree-vector from XML.
CTAEXPORT int CTA_TreeVector_OpOnLeafs (CTA_TreeVector treevec1, CTA_TreeVector treevec2, CTA_Func op, CTA_Handle arg)
 Perform given operation on all leafs of the treevector.
CTAEXPORT int CTA_TreeVector_ElmDiv (CTA_TreeVector y, CTA_TreeVector x)
 Elementwise division of two vectors.
CTAEXPORT int CTA_TreeVector_ElmProd (CTA_TreeVector y, CTA_TreeVector x)
 Elementwise multiplication of two vectors.
CTAEXPORT int CTA_TreeVector_ElmSqrt (CTA_TreeVector y)
 Elementwise sqare root.
CTAEXPORT int CTA_TreeVector_SetSubTreeNocompute (CTA_TreeVector x, const char *tag)
 Set nocompute flag of a sub-tree vector.
CTAEXPORT int CTA_TreeVector_IncRefCount (CTA_TreeVector treevec)
 Increase the reference count of a treevector and all subtrevectors.
CTAEXPORT int CTA_TreeVector_SetMetainfo (CTA_TreeVector treevec, CTA_Metainfo minfo)
CTAEXPORT int CTA_TreeVector_GetMetainfo (CTA_TreeVector treevec, CTA_Metainfo minfo)
CTAEXPORT int CTAI_TreeVec_GetVecNumHandles (CTA_TreeVector treevec)
CTAEXPORT int CTAI_TreeVec_List (CTA_TreeVector treevec, CTA_Vector taglist, int *indx)
CTAEXPORT int CTA_TreeVector_List (CTA_TreeVector treevec, CTA_Vector taglist)
CTAEXPORT int CTA_TreeVector_GetVecNumHandles (CTA_TreeVector treevec)
CTAEXPORT void CTAI_Treevector_Operation_ScaledRMS (char *tag, CTA_Vector v1, CTA_Vector vscal, CTA_Handle hdum, int *retval)
CTAEXPORT void CTAI_Treevector_Operation_Amax (char *tag, CTA_Vector v1, CTA_Vector *v2, CTA_Handle hdum, int *retval)
CTAEXPORT void CTAI_Treevector_Operation_PrintEntry (char *tag, CTA_Vector v1, CTA_Vector v2, CTA_Handle hdum, int *retval)
CTAEXPORT void CTAI_Treevector_Operation_ScaledSSQ (char *tag, CTA_Vector v1, CTA_Vector vscal, CTA_Handle hdum, int *retval)
CTAEXPORT void CTAI_Treevector_Operation_MaxAbs (char *tag, CTA_Vector v1, CTA_Vector, CTA_Handle hdum, int *retval)

Detailed Description

Interface description of the COSTA default tree-vector component.

The tree-vector is an extension of a vector component. A tree-vector either contains a single vector or is a concatenation of a number of tree-vectors, called sub-tree-vectors in this context. The usage of sub-tree-vectors makes is possible to concatenate models or extend models as is done when a deterministic model is extended into a stochastic model. The sub-tree-vectors are also very useful inside the model source code where the whole state of the model is not represented by a single vector. The default tree-vector component uses COSTA vector-components for storing the values.

Each (sub-)tree-vector has a tag. Tree-vectors having the same tag are considered to be the same, meaning they have the same buildup in sub-tree-vectors, length and datatypes.

Definition in file cta_treevector.h.


Typedef Documentation

Type definition of a handle to a COSTA tree-vector instance

Definition at line 50 of file cta_treevector.h.


Function Documentation

CTAEXPORT int CTA_TreeVector_Axpy ( CTA_TreeVector  y,
double  alpha,
CTA_TreeVector  x 
)

Axpy operation between two tree-vectors.

Note:
Axpy: y=alpha*x+y. Add alpha times tree-vector x to this tree-vector (y).
Parameters:
y IO Tree-vector (y)
alpha I scalar
x I Tree-vector (x)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Conc ( CTA_TreeVector  treevec1,
CTA_TreeVector treevecs,
int  ntreevecs 
)

Define a tree-vector to be a concatination of other tree-vectors.

Note:
The concatenation is done by reference (handle). The sub-tree-vectors that are concatenated are not copied.
Parameters:
treevec1 I tree-vector that will be concatenation of the sub-tree-vectors provided in parameter treevecs
treevecs I array of the sub-tree-vectors
ntreevecs I number of sub-tree-vectors in treevecs
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Copy ( CTA_TreeVector  treevec1,
CTA_TreeVector  treevec2 
)

Copy a tree-vector.

Note:
The two tree-vectors must be compatible: same structure and datatypes.
Parameters:
treevec1 I sending tree-vector
treevec2 O receiving tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Create ( const char *  name,
const char *  tag,
CTA_TreeVector treevec 
)

Create a tree-vector.

Parameters:
name I name of the tree-vector, this is a human readable string used for (debug) output and not by the algorithms itself
tag I tag of this tree-vector
treevec O new tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Dot ( CTA_TreeVector  treevec1,
CTA_TreeVector  treevec2,
double *  dotprod 
)

Compute dot product of two tree-vectors.

Note:
dotprod = sum[all i] (treevec1_i * treevec2_i)
Parameters:
treevec1 I first tree-vector
treevec2 I second tree-vector
dotprod O receives the dot product
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Duplicate ( CTA_TreeVector  treevec1,
CTA_TreeVector treevec2 
)

Duplicate a tree-vector.

Note:
Duplication means that a new tree-vector is created that is identical to the originating tree-vector. All data in the original tree-vector is also copied.
Parameters:
treevec1 I handle of treevector to be duplicated
treevec2 O receives handle to duplicate
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_ElmDiv ( CTA_TreeVector  y,
CTA_TreeVector  x 
)

Elementwise division of two vectors.

Note:
y:=y./x
Parameters:
y I handle of a COSTA tree-vector (y)
x I handle of a COSTA tree-vector (y)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_ElmProd ( CTA_TreeVector  y,
CTA_TreeVector  x 
)

Elementwise multiplication of two vectors.

Note:
y:=y.*x
Parameters:
y I handle of a COSTA tree-vector (y)
x I handle of a COSTA tree-vector (y)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_ElmSqrt ( CTA_TreeVector  y  ) 

Elementwise sqare root.

Note:
y:=sqrt(y)
Parameters:
y I handle of a COSTA tree-vector (y)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Export ( CTA_TreeVector  treevec,
CTA_Handle  usrdata 
)

Export tree-vector.

Can export tree-vector to file or pack object.
usrdata must contain a handle of the file or pack object to be used.
Dependency: CTA_Vector_Export()

Parameters:
treevec I Tree-vector
usrdata I export properties
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Free ( CTA_TreeVector treevec,
int  recursive 
)

Free Tree-vector.

Parameters:
treevec I handle of tree-vector
recursive I also free all sub-tree-vectors, yes: CTA_TRUE or no: CTA_FALSE
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Gemm ( CTA_TreeVector sC,
int  nc,
int  transa,
int  transb,
double  alpha,
CTA_TreeVector sA,
int  na,
CTA_Matrix  mB,
double  beta 
)

Perform the matrix multiplication C:=alpha*op(A)*op(B)+beta*C where op(X)=X, X^T. However C and A are matrices of wich the columns are tree-vectors.

Parameters:
sC IO array of tree-vector (matrix C)
nc I number of columns of C (dimension of sC)
transa I transpose flag CTA_TRUE/CTA_FALSE for matrix A (not supported)
transb I transpose flag CTA_TRUE/CTA_FALSE for matrix B
alpha I scalar
sA I handle of matrix A
na I number of columns of A (dimension of sA)
mB I handle of matrix B
beta I scalar
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetMetainfo ( CTA_TreeVector  treevec,
CTA_Metainfo  minfo 
)
CTAEXPORT int CTA_TreeVector_GetNumSubTree ( CTA_TreeVector  treevec,
int *  numSubTrees 
)

Get number of sub-treevectors.

Note:
In case of a leaf 0 is returned
Parameters:
treevec I Tree-vector
numSubTrees O Number of sub-treevectors
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetSize ( CTA_TreeVector  treevec,
int *  n 
)

Get size of tree-vector.

Parameters:
treevec I Tree-vector
n O receives size of tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetSubTreeVec ( CTA_TreeVector  treevec,
const char *  tag,
CTA_TreeVector subtreevec 
)

Get the handle of a sub-tree-vectors using its tag.

Note:
This is done by reference (handle). The handle of the returned sub-tree-vector is not a copy
Parameters:
treevec I Tree-vector
tag I tag of the requested sub-tree-vector
subtreevec O receives handle of the requested sub-tree-vectors, this is by reference, not a copy
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetSubTreeVecId ( CTA_TreeVector  treevec,
int  index,
char  tag[CTA_STRLEN_TAG] 
)

Get the tag of a sub-tree-vector using its index (starting with 0).

Parameters:
treevec I Tree-vector
index I index of the requested sub-tree-vector
tag O String of standard length containnig the tag
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetSubTreeVecIndex ( CTA_TreeVector  treevec,
int  index,
CTA_TreeVector subtreevec 
)

Get the handle of a first-layer sub-tree-vector using its index.

Note:
The concatination is done by reference (handle). The handle of the returned sub-tree-vector is not a copy
Parameters:
treevec I Tree-vector
index I index of requested sub-tree-vector. Note that the first sub-tree-vector has index 1.
subtreevec O receives handle of the requested sub-tree-vector, this is by reference, not a copy
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetTag ( CTA_TreeVector  treevec,
char *  tag 
)

Get the tag of the tree-vector.

Note tag should be large enough to hold the result length of CTA_STRLEN_TAG is always save (no internal protection)

Parameters:
treevec I Tree-vector
tag O receives the tag of the requested sub-tree-vector (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetVal ( CTA_TreeVector  treevec,
int  i,
void *  val,
CTA_Datatype  datatype 
)

Get single value of the tree-vector.

Parameters:
treevec I Tree-vector
i I index in value in tree-vector
val O returned value
datatype I data type of *val, must be the same as data type of element in tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetVals ( CTA_TreeVector  treevec,
void *  val,
int  nval,
CTA_Datatype  datatype 
)

Get all values of the tree-vector.

Note:
This method can only be used if all elements of the tree-vector are of the same data type.
Parameters:
treevec I Tree-vector
val O receives the values
nval I number of elements in val
datatype I data type of *val, must be the same as data type of elements in tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetVec ( CTA_TreeVector  treevec,
CTA_Vector  hvec 
)

Get the values of the tree-vector.

Note:
This operation is only possible when all data elements in the tree-vector are of the same type and the size of the tree-vector corresponds to the vector size.
Parameters:
treevec I Tree-vector
hvec O Vector that is receiving the values; must exist before calling
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_GetVecNumHandles ( CTA_TreeVector  treevec  ) 
CTAEXPORT int CTA_TreeVector_Import ( CTA_TreeVector  treevec,
CTA_Handle  usrdata 
)

Import Tree-vector.

Can import tree-vector from file or pack object.
usrdata must contain a handle of the file or pack object to be used.
Dependency: CTA_Vector_Import()

Parameters:
treevec I Tree-vector
usrdata I import properties
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_IncRefCount ( CTA_TreeVector  treevec  ) 

Increase the reference count of a treevector and all subtrevectors.

Parameters:
treevec I handle of a COSTA tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Info ( CTA_TreeVector  treevec  ) 

Print tree-vector information.

Gives following information:

Tree-vector information:
tag: [tag]
nsubtreevecs: [number of sub-tree-vectors]

If nsubtreevecs > 0: recursively prints all sub-tree-vectors Else prints:
leaf: yes
tree-vector size (leaf)

Parameters:
treevec I tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_List ( CTA_TreeVector  treevec,
CTA_Vector  taglist 
)
CTAEXPORT int CTA_TreeVector_Nrm2 ( CTA_TreeVector  treevec1,
double *  nrm2 
)

Compute the 2-norm of a tree-vector.

Parameters:
treevec1 I Tree-vector
nrm2 O receives the 2-norm
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_OpOnLeafs ( CTA_TreeVector  treevec1,
CTA_TreeVector  treevec2,
CTA_Func  op,
CTA_Handle  arg 
)

Perform given operation on all leafs of the treevector.

Parameters:
treevec1 I handle of first COSTA tree-vector
treevec2 I handle of second COSTA tree-vector
treevec I handle of a COSTA tree-vector
op I operation to perform on the leafs
arg I additional argument of operation
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_Scal ( CTA_TreeVector  treevec,
double  alpha 
)

Scale tree-vector.

Parameters:
treevec IO handle of tree-vector
alpha I scalar
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_SetConstant ( CTA_TreeVector  treevec,
void *  val,
CTA_Datatype  datatype 
)

Set whole tree-vector equal to a constant value.

Note:
This method can only be used if all elements of the tree-vector have the same data type.
Parameters:
treevec IO TreeVector
val I value to set
datatype I data type of val, must be same as data type of tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_SetMetainfo ( CTA_TreeVector  treevec,
CTA_Metainfo  minfo 
)
CTAEXPORT int CTA_TreeVector_SetSubTreeNocompute ( CTA_TreeVector  x,
const char *  tag 
)

Set nocompute flag of a sub-tree vector.

When this flag is set, the values of the sub-treevector will be ignored in all basic vector operations (including asking the total length of the tree-vector). This propertie is used for additionally adding some meta information

Note:
the nocompute flag is set at the level of the parent! so the "isolated" sub-treevector can be used in basic vector operations.
Parameters:
x I handle of a COSTA tree-vector (y)
tag I tag of sub-treevector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_SetVal ( CTA_TreeVector  treevec,
int  i,
void *  val,
CTA_Datatype  datatype 
)

Set single value of the tree-vector.

Parameters:
treevec IO Tree-Vector
i I index of value in tree-vector
val I value to be set
datatype I data type of *val, must be the same as data type of element in tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_SetVals ( CTA_TreeVector  treevec,
void *  val,
int  nval,
CTA_Datatype  datatype 
)

Set all values of the tree-vector.

Note:
This method can only be used if all elements of the tree-vector are of the same data type.
Parameters:
treevec IO Tree-vector
val I values to be set
nval I number of elements in val
datatype I data type of *val, must be the same as data type of elements in tree-vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_SetVec ( CTA_TreeVector  treevec,
CTA_Vector  hvec 
)

Set the values of the tree-vector.

Note:
This operation is only possible when all data elements in the tree-vector are of the same type and the size of the tree-vector corresponds to the size of the input vector.
Parameters:
treevec IO TreeVector
hvec I handle of the vector containing new values (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_TreeVector_VImport ( CTA_TreeVector  treevec,
CTA_Handle  usrdata 
)

Import Tree-vector as flat vector.

Can import tree-vector from netcdf file.
usrdata must contain a handle of the file .
Dependency: CTA_Vector_VImport()

Parameters:
treevec I Tree-vector
usrdata I import properties
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTAI_TreeVec_GetVecNumHandles ( CTA_TreeVector  treevec  ) 
CTAEXPORT int CTAI_TreeVec_List ( CTA_TreeVector  treevec,
CTA_Vector  taglist,
int *  indx 
)
CTAEXPORT void CTAI_Treevector_Operation_Amax ( char *  tag,
CTA_Vector  v1,
CTA_Vector v2,
CTA_Handle  hdum,
int *  retval 
)
CTAEXPORT void CTAI_Treevector_Operation_MaxAbs ( char *  tag,
CTA_Vector  v1,
CTA_Vector  ,
CTA_Handle  hdum,
int *  retval 
)
CTAEXPORT void CTAI_Treevector_Operation_PrintEntry ( char *  tag,
CTA_Vector  v1,
CTA_Vector  v2,
CTA_Handle  hdum,
int *  retval 
)
CTAEXPORT void CTAI_Treevector_Operation_ScaledRMS ( char *  tag,
CTA_Vector  v1,
CTA_Vector  vscal,
CTA_Handle  hdum,
int *  retval 
)
CTAEXPORT void CTAI_Treevector_Operation_ScaledSSQ ( char *  tag,
CTA_Vector  v1,
CTA_Vector  vscal,
CTA_Handle  hdum,
int *  retval 
)
CTAEXPORT CTA_TreeVector CTAI_XML_CreateTreeVec ( xmlNode *  cur_node  ) 

Create a COSTA tree-vector from XML.

Parameters:
cur_node I Current XML node
Returns:
Handle to create or CTA_NULL in case of an error.
CTAEXPORT void CTAI_XML_WriteTreeVec ( CTA_TreeVector  treevec,
xmlTextWriter *  writer 
)

Generate XML from one COSTA tree-vector.

Parameters:
treevec I handle of a COSTA tree-vector
writer I the XML text writer

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1