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.

shouldBeEvaluated


Vertex(int)
 Class's initialization

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.

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

getLastCurrent()
 Recursive function which returns last KCL equation of all elements connected to it,
including all vertices which are connected to this one.

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.

setEvalBit()
 Test if this connector should be evaluated during iterations
or there is some voltage source connected to it, which sets the voltage.

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.
shouldBeEvaluated
public boolean shouldBeEvaluated
Vertex
public Vertex(int num)
 Class's initialization
 Parameters:
 num  vertex' index.
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.
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.
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.
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.
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.
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.