Update memory allocate matrix, only update self in leaf node
Merge pull request #16 from shamenchens/TreeData-RefineDataStructure

Update memory allocate matrix, only update self in leaf node