PropertyNode::dVals2

ClassName

PropertyNode

AccessType

public

Name

dVals2

Declaration

matrix<double> dVals2

Remark

Examples

EX1

void PropertyNode_dVals2_ex1()
{
    Tree tr;
    TreeNode trN = tr.AddNode("node1",1);
 
    matrix<double> matd = {
        {1.1,2.2,3.3},
        {4.4,5.5,6.6}
    };
    trN.dVals2 = matd;    //Assign matrix values to tree node
 
    matrix<double> matCheck;
    matCheck = trN.dVals2;
 
    for(int ii = 0; ii < matCheck.GetNumRows(); ii++)
    {
        for(int jj = 0; jj < matCheck.GetNumCols(); jj++)
                printf("%f\t",matCheck[ii][jj]);
                printf("\n");
    }
}

EX2

void PropertyNode_dVals2_ex2()
{
    Tree tr;
    TreeNode tn = tr.AddNode("MatrixData");
    
    matrix<double>    myMatrix = {{1,2},{3,4}};
    tn.dVals2 = myMatrix;             //Assign matrix values to tree node    

    int nTypeStored = tn.TypeID;
    int nTypeShouldBe = TNVAL_TYPE_DOUBLE_MATRIX;
    
    if (nTypeStored == nTypeShouldBe)
        out_str("Node type is double matrix\n"); 
    else
        out_str("Node type is not double matrix\n"); 
}

Description

Matrix of double values of the node.

header to Include

origin.h

See Also

PropertyNode::dVal, PropertyNode::dVals

Reference