Get matrix data from the current tree node
bool get_numerica_matrix_treenode( TreeNode & tr, matrixbase & matNum )
Returns true for success or false not.
EX1
void get_numerica_matrix_treenode_Ex1() { Tree tr; TreeNode trN = tr.AddNode("node1",1); matrix<int> matd = { {1, 2, 3}, {4, 5, 6} }; trN.nVals2 = matd; // assign int type matrix matrix<double> matCheck; if(get_numerica_matrix_treenode(trN,matCheck)) // get matrix as double data type { for(int ii = 0; ii < matCheck.GetNumRows(); ii++) { for(int jj = 0; jj < matCheck.GetNumCols(); jj++) printf("%f\t",matCheck[ii][jj]); printf("\n"); } } else printf("fail to obtain data from treenode\n"); }
get_numerica_vector_treenode
origin.h