Is there a specific data structure, object oriented programming methodology, and/or approach for achieving what programs like LT Spice, Altium Designer, and Cadence Virtuoso use to manage components/nets/nodes on schematics? Specifically in Java?

enter image description here

Above is an example, a sample schematic from LT Spice. There are a bunch of components (in programming these might be objects?), and the red dots are called nodes in LT Spice (possibly nodes in programming also?), and the little blue dots surrounding each component are also nodes. They're all connected with wires. In the end, the program can simulate the circuit by relating each of the components and how they are connected to one another. And these components are likely stored in some data structure, like a tree or an array. How might a program like LT Spice store the components?

I have distilled the above electrical schematic into a simpler diagram that might help visualize what data structure could be used to hold the data, without the added confusion of EE material. The important thing to consider is, much like a schematic, the nodes can be in ANY combination that the user puts them into, and there can be infinitely more nodes than what is depicted (within reason and computing capabilities), just as some electronic circuits contain thousands of components and one node might be shared with half a dozen other components. So, the example I'm showing is only for one specific case where we can see one type of data structure might not work, such as a binary tree. All of the circles are a node.

enter image description here

So again, is there a specific data structure or OOP methodology that would best store a mutable web of interconnected data, such as the ones found in electronic schematic software programs?

  • Have a look here: graphsharp.codeplex.com Commented Apr 29, 2016 at 22:27
  • @Robert Harvey Yes, graphsharp.codeplex.com is an example, I opened one of the graphs and it displays the plot very similar to the programs I've mentioned and the plots can be adjust by changing their layout algorithm and they maintain their connections also very much in the same way as the programs I've mentioned. So what kind of data structure do you think they use to contain the points? I can see their source code, but I'm not too hip on C# and it's a large program... Commented Apr 29, 2016 at 22:56
  • Netlist? (en.wikipedia.org)
    – rwong
    Commented May 30, 2016 at 2:38
  • 1
    This really is too broad. A graph is the most basic representation, and to approach the capability of stuff like Altium adds tons of complexity that will vary depending on your goals, there is no general explanation for all of it. Commented May 30, 2016 at 5:12
  • The point of software design is to come up with new/modified data structures that best fit your needs. And data structures are one of the basic skills of software developer. If quick search doesn't turn out anything, then last way is to make one yourself.
    – Euphoric
    Commented Jun 29, 2016 at 5:39

1 Answer 1


There seems to be some confusion in this question about modeling.

  • Flowcharts are for modeling the control logic and flow in a program, or more generally a process.

  • UML diagrams are normally used for modeling various aspects of program design including relationships between classes, relationships between modules, relationships between objects, control flow (activity diagrams) and so on. But the notations are all abstracted away from the problem domain.

What you seem to be asking is how to represent a circuit diagram.

  • If you are asking how to model a data structure that can represent circuit diagrams, then a UML class diagram would be a good choice.

  • If you are asking for a way to model a specific circuit, then a UML object diagram could be used, but you are better off using conventional circuit notation.

  • If you are asking us to propose a specific data structure, that's too broad. But I would start with a top-level abstract class to represent a component or wire junction and another one to represent a wire.

  • I think to avoid further confusion, I should just stick with the electronic circuit example, it's closest to what I'm trying to accomplish in the end. UML and flowchart were added with the hope they would add detail and clarify the question. So, I don't want to represent the circuit in the form of a UML diagram, I want to know how I should store all the components in the circuit, what data structure or OOP method, so that I can maintain their node interconnects and easily access each circuit component's data. Commented Apr 30, 2016 at 1:51
  • See my final bullet point.
    – Stephen C
    Commented Apr 30, 2016 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.