Content deleted Content added
fix error |
No edit summary |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1:
{{short description|Network representation of the relationships between objects in a program}}
{{mi|
{{Unreferenced|date=November 2014}}
{{Inappropriate tone|date=November 2014}}}}
In [[computer science]], in an [[Object-oriented programming|object-oriented program]], groups of [[Object (computer science)|objects]] form a network through their relationships with each other, either through a direct [[Reference (computer science)|reference]] to another object or through a chain of intermediate references. These groups of objects are referred to as '''object graphs''', after the mathematical objects called [[Graph (discrete mathematics)|graphs]] studied in [[graph theory]].
An
Object-oriented applications contain complex webs of interrelated objects. Objects are linked to each other by one object either owning or containing another object or holding a reference to another object. This web of objects is called an object graph and it is the more abstract structure that can be used in discussing an application's state.
Line 13 ⟶ 14:
==Examples==
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,
An example of an [[adjacency list]] representation might be something as follows:
c:Car → {
==See also==
|