gpalta.core
Class TempOutputFactory

java.lang.Object
  extended by gpalta.core.TempVectorFactory

public class TempOutputFactory
extends java.lang.Object

Hold outputs in which the nodes will be evaluated (when using evalVect) This is done to avoid allocating memory every time a node is evaluated, greatly improving execution speed with large data sets


Constructor Summary
TempOutputFactory(int outputDimension, int vectorSize)
          Creates a new instance of TempOutputFactory
 
Method Summary
 Output get()
          Get a new output object.
 void release()
          Tell that the latest requested output object is no longer needed by the Node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempOutputFactory

public TempOutputFactory(int outputDimension,
                         int vectorSize)
Creates a new instance of TempOutputFactory

Parameters:
vectorSize - The size of each array (number of samples)
Method Detail

get

public Output get()
Get a new output object. If previously allocated outputs are available (not already in use), it will return one of them. Else, it will allocate memory for a new one


release

public void release()
Tell that the latest requested output object is no longer needed by the Node. The Node that requested an array must release it inmediately after stopping using it, or every time a node of that kind is evaluated, an output will be created and never released, leading to HUGE MEMORY LEAKS.