Can I add arbitrary properties to nodes and then perform operations (like sum, but sometimes more complex) operations ascending the DAG towards the root node? One example use case is defining a system like spacecraft, which is hierarchically decomposed into components, and those components are “systems” which can be further decomposed. This is contrived of an example, but say I defined M_Be as the mass of beryllium and M_Fe as the mass of iron in the leaf nodes. I might want to find the mass of beryllium in the spacecraft or the mass of iron. The mass examples are trivial cases, and I feel this is a very mundane problem compared to almost any posting I have seen in this forum.
IGraph/M does not bring its own graph data structure. Instead, it uses Mathematica’s built-in Graph
, which is responsible for storing properties (see Property/Annotation
, PropertyValue/AnnotationValue
, etc.) . Thus you can do this with Mathematica’s built-in functions, so this question is better for StackExchange, where you have already posted it:
Thank you kindly. I appreciate your response. I need to understand this annotation feature much more deeply.