|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--logicell.CLogicellUniverse
This class is the Universe of Logicell, the place where everything happens.
Field Summary | |
(package private) CLogicellUI |
App
Pointer to App |
private java.util.Vector |
Blocks1
2 lists of blocks |
private java.util.Vector |
Blocks2
2 lists of blocks |
private java.util.Vector |
BlocTmp
Contains the working list. |
private java.util.Vector |
CellsBlocs
Contains the current cells blocks. |
(package private) static int |
DefaultDisplayStep
|
(package private) static int |
DefaultSpeed
|
private int |
DisplayStep
Display only each x generations |
(package private) int |
EntryBinVal
Value of bin entry in digit mode |
(package private) static char |
FirstEntry
|
private int |
Generation
|
(package private) boolean |
IsRunning
Running flag |
(package private) java.lang.Thread |
LogicellUnivThread
Thread |
private CLogiTemplate[] |
LogiTempl
Logical structure e.d. a list of templates (equations) representing a problem |
private boolean[] |
LookUp
Lookup table |
private int[] |
LTOutput
Current templates OutputStates. |
(package private) static int |
M_BINADD
|
(package private) static int |
M_BINADD2
|
(package private) static int |
M_CONWAY
|
(package private) static int |
M_DIGIT
|
(package private) static int |
M_DIGIT2
|
(package private) static int |
M_EQUATION
|
(package private) static int |
M_INIT
Working mode |
(package private) static int |
M_LIGHT
|
(package private) CLogicellView |
MainView
View |
(package private) static int |
MAXENTRY
Maximum entries, in fact the algorithm is not limited. |
private int |
Mode
Mode |
private int |
NbTemplate
Template # in a problem |
(package private) COpDispView |
OpDispView
Output View |
(package private) int |
PatHeight
Pattern size x |
private CPattern |
Pattern
A pattern |
(package private) int |
PatWidth
Pattern size y |
private int |
RemoveEmptyGen
Remove empty block every # generation. |
private boolean |
SolFound
|
(package private) int |
Speed
Iteration delay |
private int |
SpeedOffset
Speed offset used for speed modification. |
(package private) long |
Time1
|
(package private) long |
TimeAdd
|
(package private) long |
TimeCalc
|
(package private) long |
TimeDisp
|
(package private) long |
TimePoint
|
Constructor Summary | |
CLogicellUniverse(CLogicellUI lu)
Constructor |
Method Summary | |
private int |
CheckOutput(CLogiTemplate lt,
int gen)
Check Ouput Value |
(package private) void |
DrawEquation()
Draw Equation |
(package private) void |
DrawOutput()
Draw Output |
void |
DrawWorld()
Default drawing |
private void |
DrawWorld(jpUtil.JPView jpv)
Draw World |
void |
end()
This is the end... |
(package private) void |
GenConwayPat(int pat)
Construct a simple conway pattern |
void |
GenLogiProblem(java.lang.String[] templ,
int st,
boolean[] entries,
int se)
Construct a Logical Problem e.d. a combination of templates. |
private void |
GenNewBlocs()
Generation of next pop. |
(package private) java.lang.String |
GetInfoText(int mode,
int pat)
Get Info text |
int |
GetLtOutputState(int i)
Return a Logitempl output state |
int |
GetMode()
Get Mode |
int |
GetSpeed()
Get Speed |
void |
Go()
Run the World in View e.g. creates a new pop and draw world. |
private void |
InitLookUp()
Init lookup table |
void |
InitView()
Init View |
(package private) void |
InitWorld()
Init the world |
(package private) void |
Launch()
Start the world |
private int |
Neighbour(long v,
boolean c)
Calc #neighbour |
void |
RemoveViews()
Remove views |
void |
run()
Launch thread |
void |
SetMode(int mode)
Set the Mode |
private void |
SetSpeed(int s)
Set speed |
void |
SpeedDecr()
Decrease speed |
void |
SpeedIncr()
Increase speed |
void |
stop()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
static final int MAXENTRY
static final int DefaultSpeed
static final int DefaultDisplayStep
static final char FirstEntry
static final int M_INIT
static final int M_EQUATION
static final int M_CONWAY
static final int M_LIGHT
static final int M_DIGIT
static final int M_DIGIT2
static final int M_BINADD
static final int M_BINADD2
CLogicellUI App
int PatHeight
int PatWidth
CLogicellView MainView
COpDispView OpDispView
java.lang.Thread LogicellUnivThread
int EntryBinVal
boolean IsRunning
int Speed
long Time1
long TimeCalc
long TimeDisp
long TimePoint
long TimeAdd
private final int RemoveEmptyGen
private final int SpeedOffset
private boolean[] LookUp
private java.util.Vector CellsBlocs
private java.util.Vector BlocTmp
private java.util.Vector Blocks1
private java.util.Vector Blocks2
private CPattern Pattern
private CLogiTemplate[] LogiTempl
private int[] LTOutput
private int NbTemplate
private int Mode
private boolean SolFound
private int Generation
private int DisplayStep
Constructor Detail |
public CLogicellUniverse(CLogicellUI lu)
Method Detail |
void InitWorld()
public void InitView()
public void run()
void Launch()
public void GenLogiProblem(java.lang.String[] templ, int st, boolean[] entries, int se)
void GenConwayPat(int pat)
public void Go()
public void SetMode(int mode)
public int GetMode()
public void DrawWorld()
void DrawEquation()
void DrawOutput()
public void RemoveViews()
public void stop()
public void end()
java.lang.String GetInfoText(int mode, int pat)
public int GetSpeed()
public void SpeedIncr()
public void SpeedDecr()
public int GetLtOutputState(int i)
private int CheckOutput(CLogiTemplate lt, int gen)
private void GenNewBlocs()
private void InitLookUp()
private int Neighbour(long v, boolean c)
private void DrawWorld(jpUtil.JPView jpv)
private void SetSpeed(int s)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |