|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--LGames.Context
This class implements the construction and maintanance of the context Each element of the context is a geometrical figure that is specified by certain features. Possible figures include rectangles, squares, triangles and circles. The context keeps also track of the categorisation of its featureVector.
Copyright (c) 2004 Paul Vogt
Field Summary | |
float[] |
blue
|
int[][] |
description
|
boolean[] |
distinctive
|
double[][] |
featureVector
|
boolean[] |
foa
|
float[] |
green
|
int[] |
height
|
protected java.lang.String |
labels
|
int[] |
pointX
|
int[] |
pointY
|
float[] |
red
|
int[] |
types
|
int[] |
width
|
Constructor Summary | |
Context()
Empty constructor |
|
Context(Context C,
double noise)
|
|
Context(int cxtSize,
boolean[] features,
boolean fixedColors)
This constructor constructs a new context from scratch. |
|
Context(int cxtSize,
boolean[] features,
boolean fixedColors,
int[][] ts,
int tslength)
This constructor constructs a context based on the training set given. |
|
Context(int nMeanings,
int cxtSize)
This constructor creates a context using predefined meanings. |
Method Summary | |
int |
categoryLength()
Basically returns the context size |
int |
getCategory(int i)
|
java.lang.String |
getDString(int t)
|
double[] |
getFV(int T)
Returns the feature vector of segment T |
java.lang.String |
getLabels()
Returns the string representation of the labels that indicate the selected features |
Meaning |
getMeaning()
|
void |
initDGame()
Initialises a discrimination game by setting for all objects distinctive to false; |
void |
print(int n)
Writes the feature vectors of the context to the standard output |
void |
print(java.util.List o)
Writes the context to the standard output |
void |
setCategory(int[] n)
This function sets the categories of the context |
void |
setCategory(int i,
int n)
This function sets the category of an object |
void |
setFOA(int t,
int length)
Sets the focus of attention |
void |
setMeaning(Meaning M,
int T)
Sets the meaning of the topic T to meaning M |
int[][] |
setTrainingSet(int size)
This function constructs the training set, which is a subset of all objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int[][] description
protected java.lang.String labels
public double[][] featureVector
public boolean[] distinctive
public boolean[] foa
public int[] types
public int[] height
public int[] width
public int[] pointX
public int[] pointY
public float[] red
public float[] green
public float[] blue
Constructor Detail |
public Context()
public Context(int nMeanings, int cxtSize)
public Context(Context C, double noise)
public Context(int cxtSize, boolean[] features, boolean fixedColors)
cxtSize
- The size of the contextfeatures
- This is a boolean array telling which features are selected of the RGBSXYfixedColors
- This boolean tells if the colours should be
generated randomly (true) or selected from a list (false)public Context(int cxtSize, boolean[] features, boolean fixedColors, int[][] ts, int tslength)
cxtSize
- number of objects in the contextfeatures
- an array of features that are usedfixedColors
- whether colors are selected from a fixed set (true) or not (false)ts
- the training set.tslength
- the size of the first dimension (ie. the size of the training set)Method Detail |
public int[][] setTrainingSet(int size)
size
- the size of the subset.
public java.lang.String getLabels()
public void setFOA(int t, int length)
public double[] getFV(int T)
public void setMeaning(Meaning M, int T)
public void initDGame()
public Meaning getMeaning()
public java.lang.String getDString(int t)
public void print(java.util.List o)
public void print(int n)
public int getCategory(int i)
i
- the index of an object in the context
public void setCategory(int i, int n)
i
- the index of the objectn
- the category (Meaning/ANMeaning) of the objectpublic void setCategory(int[] n)
n
- an array with the categories (Meaning/ANMeaning) of the objectspublic int categoryLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |