Object graph: Difference between revisions

Content deleted Content added
No edit summary
m remove expand tag from stubs or convert section items using AWB
Line 6:
 
==Physical representation==
An object graph is a [[directed graph]], which might be [[Cycle graph|cyclic]]. When stored in [[Random access memory|RAM]], objects occupy different segments of the memory with their attributes and function table, while relationships are represented by [[Pointer_Pointer (computing)|pointers]] or a different type of global handler in higher-level languages.
 
==Examples==
{{Expand section|date=March 2007}}
For instance, a Car class can compose a Wheel one. In the object graph a Car instance will have up to four links to its wheels, which can be named frontLeft, frontRight, backLeft and backRight.
Example of an [[adjacency list]] representation: c:Car → {frontLeft:Wheel, frontRight:Wheel, backLeft:Wheel, backRight:Wheel}.