clarion.acs
Class VCGSet

java.lang.Object
  extended byclarion.acs.VCGSet

public class VCGSet
extends java.lang.Object


Field Summary
protected  short[] candidates
          candidates from all of the VCGs.
protected  short[] elemNums
          # of possible values in each VCG.
protected  int fullLength
          full expansion length of this VCG set.
protected  int type
          dimension type : single-active-valued, multiple-active-valued.
protected  int vcgNum
          the num of VCG in this VCG set.
protected  short[] vcgOffsets
          start point of each VCG in the format of one dimensional array.
protected  VCG[] vcgs
          a set of VCG groups corresponding to one original output dimension.
 
Constructor Summary
VCGSet(int type, int vcgNum, short[] elemNums)
          constructor.
 
Method Summary
 short[] decideActiveValues()
          Decides active elements from the VCG set (EXCEPT the SIGNAL VCG) according to the dimension type.
 double getActivation(int vcgIdx, int elemIdx)
          Returns the activation of a specific element.
 double[] getActivations()
          Returns the activations.
 short[] getCandidates()
          Returns the candidates.
 short[] getElemNums()
          # of possible values in each VCG.
 int getFullLength()
          Returns full length.
 double getMaxActivation(int vcgIdx)
          Returns the MAX activation of a specific VCG.
 short getSignalCandidate()
          Returns the signal candidate.
 int getType()
          Returns the dimension type : single-active-valued, multiple-active-valued.
 int getVCGNum()
          Returns the VCG num.
 void setActivations(double[] activations)
          Sets activations.
 void setActiveValues(short[] activeValues)
          Sets the active values of this dimension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected int type
dimension type : single-active-valued, multiple-active-valued.


fullLength

protected int fullLength
full expansion length of this VCG set.


vcgNum

protected int vcgNum
the num of VCG in this VCG set.


elemNums

protected short[] elemNums
# of possible values in each VCG.


vcgOffsets

protected short[] vcgOffsets
start point of each VCG in the format of one dimensional array.


vcgs

protected VCG[] vcgs
a set of VCG groups corresponding to one original output dimension. PLUS an additional signal VCG at its end.


candidates

protected short[] candidates
candidates from all of the VCGs.

Constructor Detail

VCGSet

public VCGSet(int type,
              int vcgNum,
              short[] elemNums)
constructor.

Parameters:
type - dimension type.
vcgNum - number of VCG.
elemNums - number of elements in each VCG. Both vcgNum and elemNums consider the signal VCG.
Method Detail

getFullLength

public int getFullLength()
Returns full length.

Returns:
full length.

getType

public int getType()
Returns the dimension type : single-active-valued, multiple-active-valued.

Returns:
the dimension type.

getVCGNum

public int getVCGNum()
Returns the VCG num.

Returns:
the VCG num.

getElemNums

public short[] getElemNums()
# of possible values in each VCG.


getCandidates

public short[] getCandidates()
Returns the candidates.

Returns:
the candidates.

getSignalCandidate

public short getSignalCandidate()
Returns the signal candidate.

Returns:
the signal candidate.

getActivations

public double[] getActivations()
Returns the activations.

Returns:
the activations.

getActivation

public double getActivation(int vcgIdx,
                            int elemIdx)
Returns the activation of a specific element.

Parameters:
vcgIdx - an index to a VCG.
elemIdx - an index to an element in the VCG.
Returns:
the activation of a specific element.

getMaxActivation

public double getMaxActivation(int vcgIdx)
Returns the MAX activation of a specific VCG.

Parameters:
vcgIdx - an index to a VCG.
Returns:
the MAX activation of a specific VCG.

setActivations

public void setActivations(double[] activations)
Sets activations. called by BL action.

Parameters:
activations - the activations calculated by BL.

setActiveValues

public void setActiveValues(short[] activeValues)
Sets the active values of this dimension. called by TL action. assumed that the input 'activeValues' doesn't include signal value.


decideActiveValues

public short[] decideActiveValues()
Decides active elements from the VCG set (EXCEPT the SIGNAL VCG) according to the dimension type. called by BL action.

Returns:
the active values.