|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.micropsi.nodenet.AbstractNativeModuleImpl
Implementations of this abstract class can be plugged into NativeModules and act as inner logic of some NetEntity. The main job for any implementation will be the calculation of a set of gates from a set of slots. You can wrap any logics into a AbstractNativeModuleImpl, as long you mind some constraints: First, NativeModules must be linkable with the net. So, every IO has to be done in doubles via Slots and Gates. Second, NativeModule implementations must stay within the net's heartbeat: Any calculation necessarily terminates within the current netstep. So, some calculation that takes more than one net cycle will have to use some sort of internal program counter.
| Nested Class Summary | |
protected class |
AbstractNativeModuleImpl.NetStepLogger
|
protected class |
AbstractNativeModuleImpl.StructureModificator
|
protected class |
AbstractNativeModuleImpl.UserInteraction
|
| Field Summary | |
protected InnerStateContainer |
innerstate
|
protected AbstractNativeModuleImpl.NetStepLogger |
logger
|
protected AbstractNativeModuleImpl.StructureModificator |
structure
|
protected AbstractNativeModuleImpl.UserInteraction |
userinteraction
|
| Constructor Summary | |
AbstractNativeModuleImpl()
|
|
| Method Summary | |
abstract void |
calculate(Slot[] slots,
GateManipulator manipulator,
long netstep)
This method is called whenever the module needs to calculate it's gates. |
void |
destroy()
Destroys the instance for less gc load |
protected abstract int[] |
getGateTypes()
Returns the types of gates to create for the module. |
protected InnerStateContainer |
getInnerStates()
Returns the innerstate object of the module |
protected abstract int[] |
getSlotTypes()
Returns the types of slots to create for the module. |
protected void |
initialize(NetEntityManager manager,
org.micropsi.nodenet.UserInteractionManager interaction,
NativeModule module)
Used by NativeModule to set the entity manager. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected AbstractNativeModuleImpl.StructureModificator structure
protected AbstractNativeModuleImpl.UserInteraction userinteraction
protected AbstractNativeModuleImpl.NetStepLogger logger
protected InnerStateContainer innerstate
| Constructor Detail |
public AbstractNativeModuleImpl()
| Method Detail |
protected abstract int[] getGateTypes()
protected abstract int[] getSlotTypes()
protected final void initialize(NetEntityManager manager,
org.micropsi.nodenet.UserInteractionManager interaction,
NativeModule module)
manager - protected InnerStateContainer getInnerStates()
public abstract void calculate(Slot[] slots,
GateManipulator manipulator,
long netstep)
throws NetIntegrityException
slots - The module's slotsmanipulator - The manipulator to be used for changing the gates
NetIntegrityExceptionpublic void destroy()
|
(c) by Micropsi Project: http://www.cognitive-agents.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||