fbpx
Wikipedia

Object graph

In computer science, in an object-oriented program, groups of objects form a network through their relationships with each other, either through a direct 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 graphs studied in graph theory.

An object graph is a view of an object system at a particular point in time. Unlike a normal data model such as a Unified Modeling Language (UML) class diagram, which details the relationships between classes, the object graph relates their instances. Object diagrams are subsets of the overall object graph.

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.

Physical representation edit

An object graph is a directed graph, which might be cyclic. When stored in RAM, objects occupy different segments of the memory with their attributes and function table, while relationships are represented by pointers or a different type of global handler in higher-level languages.

Examples edit

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, back Left and back Right. An example of an adjacency list representation might be something as follows:

 c:Car → {front Left:Wheel, front Right:Wheel, back Left:Wheel, back Right:Wheel}. 

See also edit

object, graph, this, article, does, cite, sources, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sources, news, newspapers, books, scholar, jstor, november, 2014, learn, when, remove. This article does not cite any sources Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Object graph news newspapers books scholar JSTOR November 2014 Learn how and when to remove this message This article s tone or style may not reflect the encyclopedic tone used on Wikipedia See Wikipedia s guide to writing better articles for suggestions November 2014 Learn how and when to remove this message In computer science in an object oriented program groups of objects form a network through their relationships with each other either through a direct 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 graphs studied in graph theory An object graph is a view of an object system at a particular point in time Unlike a normal data model such as a Unified Modeling Language UML class diagram which details the relationships between classes the object graph relates their instances Object diagrams are subsets of the overall object graph 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 Physical representation editAn object graph is a directed graph which might be cyclic When stored in RAM objects occupy different segments of the memory with their attributes and function table while relationships are represented by pointers or a different type of global handler in higher level languages Examples editFor 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 back Left and back Right An example of an adjacency list representation might be something as follows c Car front Left Wheel front Right Wheel back Left Wheel back Right Wheel See also editData model Object diagram Retrieved from https en wikipedia org w index php title Object graph amp oldid 1220222155, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.