Class Vertex

java.lang.Object
   |
   +----Vertex

public class Vertex
extends Object
This class implements electrical connector. It used for calculations, while in each iteration voltage is calculated for each such connector.


Variable Index

 o shouldBeEvaluated

Constructor Index

 o Vertex(int)
Class's initialization

Method Index

 o checkResult(double, double)
Recursive function which checks result of calculatoins on all elements connected to it, including all vertices which are connected to this one.
 o getKCL(double)
Recursive function which returns KCL equation of all elements connected to it, including all vertices which are connected to this one.
 o getLastCurrent()
Recursive function which returns last KCL equation of all elements connected to it, including all vertices which are connected to this one.
 o getVoltage(double, double)
Recursive function which gets the voltage of voltage source which is connected to this vertex, or one of the vertices which are connected to this one.
 o setEvalBit()
Test if this connector should be evaluated during iterations or there is some voltage source connected to it, which sets the voltage.
 o setVoltage(double, double)
Recursive function which sets result of calculatoins and current time to this vertex, and all vertices which are connected to this one.

Variables

 o shouldBeEvaluated
 public boolean shouldBeEvaluated

Constructors

 o Vertex
 public Vertex(int num)
Class's initialization

Parameters:
num - vertex' index.

Methods

 o getKCL
 public Polynom getKCL(double timeStep)
Recursive function which returns KCL equation of all elements connected to it, including all vertices which are connected to this one.

Parameters:
timeStep - iteration's timestep.
Returns:
polynom which represent KCL equation.
 o getLastCurrent
 public Polynom getLastCurrent()
Recursive function which returns last KCL equation of all elements connected to it, including all vertices which are connected to this one.

Returns:
polynom which represent last KCL equation.
 o checkResult
 public boolean checkResult(double timeStep,
                            double voltage)
Recursive function which checks result of calculatoins on all elements connected to it, including all vertices which are connected to this one.

Parameters:
timeStep - iteration's timestep.
voltage - result which is being checked.
Returns:
boolean value of yes or no.
 o setVoltage
 public void setVoltage(double volts,
                        double timer)
Recursive function which sets result of calculatoins and current time to this vertex, and all vertices which are connected to this one.

Parameters:
volts - result of calculations.
timer - current time.
 o getVoltage
 public double getVoltage(double timer,
                          double timeStep)
Recursive function which gets the voltage of voltage source which is connected to this vertex, or one of the vertices which are connected to this one.

Parameters:
timer - current time.
timeStep - iteration's timestep.
 o setEvalBit
 public boolean setEvalBit()
Test if this connector should be evaluated during iterations or there is some voltage source connected to it, which sets the voltage. This function used only once, when the graph is built, to check if the circuit is connected right.