CIDARLAB / stl-Sharp

An implementation for STL-Sharp (composition of STL functions)
Other
0 stars 0 forks source link

Modify contents of ModuleNode #1

Open PrashantVaidyanathan opened 8 years ago

PrashantVaidyanathan commented 8 years ago

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

PrashantVaidyanathan commented 8 years ago

@wasserfeder Could use your thoughts on this.

wasserfeder commented 8 years ago

Yes. It makes sense. Where do you plan to have the pointer to the mapping?

PrashantVaidyanathan commented 8 years ago

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.

wasserfeder commented 8 years ago

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?

PrashantVaidyanathan commented 8 years ago

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.