veg/hyphy — Issue #41: Columns() returns incorrect dimension for Formula string matrix
Author: ArtPoon
Created: 2011-12-06 17:54:52+00:00
State: open
Labels: Bug

mixedBN = {};

mixedBN["G"] = {};

(mixedBN["G"])["CPDFs"] = {{
"Random({{-2.0, 1.0}}, {\"PDF\":\"Gaussian\", \"ARG0\":Inverse({{1,0},{0,1}}) * (Random({{1.0}}, {\"PDF\":\"InverseWishart\", \"ARG0\":{{1.0}} }))[0] }) ",
"Random({{2.0, -1.0}}, {\"PDF\":\"Gaussian\", \"ARG0\":Inverse({{1,0},{0,1}}) * (Random({{1.0}}, {\"PDF\":\"InverseWishart\", \"ARG0\":{{1.0}} }))[0] }) ",
}};

>Columns((mixedBN["G"])["CPDFs"])
3

>((mixedBN["G"])["CPDFs"])[0]
Random({{-2.0, 1.0}}, {"PDF":"Gaussian", "ARG0":Inverse({{1,0},{0,1}}) * (Random({{1.0}}, {"PDF":"InverseWishart", "ARG0":{{1.0}} }))[0] })

>((mixedBN["G"])["CPDFs"])[1]
Random({{2.0, -1.0}}, {"PDF":"Gaussian", "ARG0":Inverse({{1,0},{0,1}}) * (Random({{1.0}}, {"PDF":"InverseWishart", "ARG0":{{1.0}} }))[0] })

>((mixedBN["G"])["CPDFs"])[0]
Random({{-2.0, 1.0}}, {"PDF":"Gaussian", "ARG0":Inverse({{1,0},{0,1}}) * (Random({{1.0}}, {"PDF":"InverseWishart", "ARG0":{{1.0}} }))[0] })

>((mixedBN["G"])["CPDFs"])[2]
**** CRASH ****

at _Matrix::MAccess line 4872:
return (_PMathObj)entryFla->Compute()->makeDynamic();