|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.nengo.model.nef.impl.NEFEnsembleFactoryImpl
public class NEFEnsembleFactoryImpl
Default implementation of NEFEnsembleFactory.
| Constructor Summary | |
|---|---|
NEFEnsembleFactoryImpl()
|
|
| Method Summary | |
|---|---|
protected void |
addDefaultOrigins(NEFEnsemble ensemble)
Adds standard decoded Origins to the given NEFEnsemble This method is exposed so that it can be over-ridden to change behaviour. |
void |
beQuiet()
Stops the factory from printing out information to console during make process. |
protected NEFEnsemble |
construct(java.lang.String name,
NEFNode[] nodes,
float[][] encoders,
ApproximatorFactory af,
float[][] evalPoints,
float[] radii)
This method is exposed so that it can be over-ridden to change behaviour. |
ApproximatorFactory |
getApproximatorFactory()
|
java.io.File |
getDatabase()
|
VectorGenerator |
getEncoderFactory()
|
VectorGenerator |
getEvalPointFactory()
|
NodeFactory |
getNodeFactory()
|
protected int |
getNumEvalPoints(int dim)
This method is exposed so that it can be over-ridden to change behaviour. |
NEFEnsemble |
make(java.lang.String name,
int n,
float[] radii)
|
NEFEnsemble |
make(java.lang.String name,
int n,
float[] radii,
java.lang.String storageName,
boolean overwrite)
Loads an NEFEnsemble, or creates and saves it. |
NEFEnsemble |
make(java.lang.String name,
int n,
int dim)
|
NEFEnsemble |
make(java.lang.String name,
int n,
int dim,
java.lang.String storageName,
boolean overwrite)
Loads an NEFEnsemble, or creates and saves it. |
void |
setApproximatorFactory(ApproximatorFactory factory)
|
void |
setDatabase(java.io.File database)
|
void |
setEncoderFactory(VectorGenerator factory)
|
void |
setEvalPointFactory(VectorGenerator factory)
|
void |
setNodeFactory(NodeFactory factory)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NEFEnsembleFactoryImpl()
| Method Detail |
|---|
public ApproximatorFactory getApproximatorFactory()
getApproximatorFactory in interface NEFEnsembleFactoryNEFEnsembleFactory.getApproximatorFactory()public VectorGenerator getEncoderFactory()
getEncoderFactory in interface NEFEnsembleFactoryNEFEnsembleFactory.getEncoderFactory()public VectorGenerator getEvalPointFactory()
getEvalPointFactory in interface NEFEnsembleFactoryNEFEnsembleFactory.getEvalPointFactory()public NodeFactory getNodeFactory()
getNodeFactory in interface NEFEnsembleFactoryNEFEnsembleFactory.getNodeFactory()public void beQuiet()
public NEFEnsemble make(java.lang.String name,
int n,
int dim)
throws StructuralException
make in interface NEFEnsembleFactoryname - Name of the NEFEnsemblen - Number of neurons in the ensembledim - Dimension of the ensemble.
StructuralException - if there is any error attempting to create the ensembleNEFEnsembleFactory.make(java.lang.String, int, int)
public NEFEnsemble make(java.lang.String name,
int n,
float[] radii)
throws StructuralException
make in interface NEFEnsembleFactoryname - Name of the NEFEnsemblen - Number of neurons in the ensembleradii - Radius of encoded region in each dimension
StructuralException - if there is any error attempting to create the ensembleNEFEnsembleFactory.make(java.lang.String, int, float[])
public NEFEnsemble make(java.lang.String name,
int n,
int dim,
java.lang.String storageName,
boolean overwrite)
throws StructuralException
NEFEnsembleFactory
make in interface NEFEnsembleFactoryname - Name of the NEFEnsemblen - Number of neurons in the ensembledim - Dimension of the ensemble.storageName - Name for storage (eg filename, db key; may have to be more fully qualified than
name param, if ensembles belonging to multiple networks are stored in the same place)overwrite - If false, loads the ensemble if it can be found in storage.
If true, creates a new ensemble regardless and overwrites any existing ensemble.
StructuralException - if there is any error attempting to create the ensembleNEFEnsembleFactory.make(java.lang.String, int, int, java.lang.String, boolean)
public NEFEnsemble make(java.lang.String name,
int n,
float[] radii,
java.lang.String storageName,
boolean overwrite)
throws StructuralException
NEFEnsembleFactory
make in interface NEFEnsembleFactoryname - Name of the NEFEnsemblen - Number of neurons in the ensembleradii - Radius of encoded region in each dimension.storageName - Name for storage (eg filename, db key; may have to be more fully qualified than
name param, if ensembles belonging to multiple networks are stored in the same place)overwrite - If false, loads the ensemble if it can be found in storage.
If true, creates a new ensemble regardless and overwrites any existing ensemble.
StructuralException - if there is any error attempting to create the ensembleNEFEnsembleFactory.make(java.lang.String, int, int, java.lang.String, boolean)public void setApproximatorFactory(ApproximatorFactory factory)
setApproximatorFactory in interface NEFEnsembleFactoryfactory - A factory for creating the LinearApproximators used in decoding ensemble outputNEFEnsembleFactory.setApproximatorFactory(ca.nengo.math.ApproximatorFactory)public void setEncoderFactory(VectorGenerator factory)
setEncoderFactory in interface NEFEnsembleFactoryfactory - A VectorGenerator to be used to create encoding vectors that are associated
with each Node in a new EnsembleNEFEnsembleFactory.setEncoderFactory(ca.nengo.util.VectorGenerator)public void setEvalPointFactory(VectorGenerator factory)
setEvalPointFactory in interface NEFEnsembleFactoryfactory - A VectorGenerator to be used to generate the vector states at which decoding
functions are evaluatedNEFEnsembleFactory.setEvalPointFactory(ca.nengo.util.VectorGenerator)public void setNodeFactory(NodeFactory factory)
setNodeFactory in interface NEFEnsembleFactoryfactory - NodeFactory to be used to create Nodes that make up new EnsemblesNEFEnsembleFactory.setNodeFactory(ca.nengo.model.impl.NodeFactory)protected int getNumEvalPoints(int dim)
dim - the dimension of the state represented by an Ensemble
protected NEFEnsemble construct(java.lang.String name,
NEFNode[] nodes,
float[][] encoders,
ApproximatorFactory af,
float[][] evalPoints,
float[] radii)
throws StructuralException
name - Name of new Ensemblenodes - Nodes that make up Ensembleencoders - Encoding vector for each Nodeaf - Factory that produces LinearApproximators for decoding Ensemble outputevalPoints - States at which Node output is evaluated for decoding purposesradii - Radius of encoded area in each dimension
StructuralException
protected void addDefaultOrigins(NEFEnsemble ensemble)
throws StructuralException
ensemble - A new NEFEnsemble
StructuralExceptionpublic java.io.File getDatabase()
public void setDatabase(java.io.File database)
database - New directory for saving / loading ensembles
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||