Open PrashantVaidyanathan opened 8 years ago
@wasserfeder Could use your thoughts on this.
Yes. It makes sense. Where do you plan to have the pointer to the mapping?
Since mapping is a property of STLflat, it can be visible to all sub-nodes (in the distance measure). I basically have the mapping as a private property of the DistanceMeasure class so that even if I call the function recursively, it will have access to the mapping.
If it is a private property, how can it be visible from the outside? I guess you store a reference that is private, but the object is visible from STLflat to other objects. Right?
Yep. The private variable is basically a reference to the Map property in STLflat (while computing the distance) in the DistanceMeasure class. But the map property itself is public in STLflat.
Perhaps ModuleNode can just contain a pointer to the child node without the left, right TreeNode properties. For instance: phi1 >>_m1 phi2 In this case, perhaps ModuleNode should point to a ConcatenationNode containing: phi1 >> phi2 instead of ModuleNode having left point to phi1 and right to phi2