All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.lazy.LBR.Indexes

java.lang.Object
    |
    +----weka.classifiers.lazy.LBR.Indexes

public class LBR.Indexes
extends java.lang.Object
implements java.io.Serializable
Class for handling instances and the associated attributes.

Enables a set of indexes to a given dataset to be created and used with an algorithm. This reduces the memory overheads and time required when manipulating and referencing Instances and their Attributes.


Variable Index

 o m_AttIndexes
the array attribute indexes
 o m_ClassIndex
the Class Index for the data set
 o m_InstIndexes
the array instance indexes
 o m_NumAttsSet
the number of attributes "in use" or set to a the original value (true or false)
 o m_NumInstsSet
the number of instances "in use" or set to a the original value (true or false)
 o m_NumSeqAttsSet
the number of sequential attributes "in use" or set to a the original value (true or false)
 o m_NumSeqInstsSet
the number of sequential instances "in use" or set to a the original value (true or false)
 o m_SequentialAttIndexes
an array of attribute indexes that are set to either true or false
 o m_SequentialInstIndexes
the array of instance indexes that are set to a either true or false

Constructor Index

 o LBR.Indexes(LBR, int, int, boolean, int)
constructor
 o LBR.Indexes(LBR, LBR.Indexes)
constructor

Method Index

 o getAttIndex(int)
Returns the boolean value at the specified index in the Attribute Indexes array
 o getInstanceIndex(int)
Returns the boolean value at the specified index in the Instance Index array
 o getNumAttributes()
Returns the number of attributes in the dataset
 o getNumAttributesSet()
Returns the number of attributes "in use"
 o getNumInstances()
Returns the number of instances in the dataset
 o getNumInstancesSet()
Returns the number of instances "in use"
 o getSequentialAttIndex(int)
Returns the boolean value at the specified index in the Sequential Attribute Indexes array
 o getSequentialInstanceIndex(int)
Returns the boolean value at the specified index in the Sequential Instance Indexes array
 o getSequentialNumAttributes()
Returns the number of attributes in the Sequential array
 o getSequentialNumInstances()
Returns the number of instances in the Sequential array
 o isSequentialAttIndexValid()
Returns whether or not the Sequential Attribute Index requires rebuilding due to a change
 o isSequentialInstanceIndexValid()
Returns whether or not the Sequential Instance Index requires rebuilding due to a change
 o resetAttIndex(boolean)
Resets the boolean value in AttIndexes array
 o resetAttIndexTo(LBR.Indexes)
Resets the boolean value in AttIndexes array based on another set of Indexes
 o resetDatasetBasedOn(LBR.Indexes)
Resets the boolean values in Attribute and Instance array to reflect an empty dataset withthe same attributes set as in the incoming Indexes Object
 o resetInstanceIndex(boolean)
Resets the boolean value in the Instance Indexes array to a specified value
 o setAttIndex(int, boolean)
Changes the boolean value at the specified index in the AttIndexes array
 o setAtts(int[], boolean)
Changes the boolean value at the specified index in the InstIndexes array
 o setInstanceIndex(int, boolean)
Changes the boolean value at the specified index in the InstIndexes array
 o setInsts(int[], boolean)
Changes the boolean value at the specified index in the InstIndexes array
 o setSequentialAttIndex(boolean)
A Sequential Attribute index is all those Attributes that are set to the specified value placed in a sequential array.
 o setSequentialDataset(boolean)
Sets both the Instance and Attribute indexes to a specified value
 o setSequentialInstanceIndex(boolean)
A Sequential Instance index is all those Instances that are set to the specified value placed in a sequential array.

Field Detail

 o m_InstIndexes
public boolean[] m_InstIndexes
          the array instance indexes
 o m_AttIndexes
public boolean[] m_AttIndexes
          the array attribute indexes
 o m_SequentialInstIndexes
public int[] m_SequentialInstIndexes
          the array of instance indexes that are set to a either true or false
 o m_SequentialAttIndexes
public int[] m_SequentialAttIndexes
          an array of attribute indexes that are set to either true or false
 o m_NumInstsSet
public int m_NumInstsSet
          the number of instances "in use" or set to a the original value (true or false)
 o m_NumAttsSet
public int m_NumAttsSet
          the number of attributes "in use" or set to a the original value (true or false)
 o m_NumSeqInstsSet
public int m_NumSeqInstsSet
          the number of sequential instances "in use" or set to a the original value (true or false)
 o m_NumSeqAttsSet
public int m_NumSeqAttsSet
          the number of sequential attributes "in use" or set to a the original value (true or false)
 o m_ClassIndex
public int m_ClassIndex
          the Class Index for the data set

Constructor Detail

 o LBR.Indexes
public LBR.Indexes(LBR this$0,
                   int numInstances,
                   int numAtts,
                   boolean value,
                   int classIndex)
          constructor
Parameters:
numInstances - the number of instances in dataset
numAtts - the number of attributes in dataset
value - either true or false
classIndex. - Set to -1 if you want class attribute switched on or the value of the instances class index will be switched of and the class attibute will not be considered.
 o LBR.Indexes
public LBR.Indexes(LBR this$0,
                   LBR.Indexes FromIndexes)
          constructor
Parameters:
FromIndexes - the object you want to copy

Method Detail

 o setInstanceIndex
public void setInstanceIndex(int index,
                             boolean value)
          Changes the boolean value at the specified index in the InstIndexes array
Parameters:
index - the index of the instance
value - the value to set at the specified index
 o setAtts
public void setAtts(int Attributes[],
                    boolean value)
          Changes the boolean value at the specified index in the InstIndexes array
Parameters:
index - the index of the instance
value - the value to set at the specified index
 o setInsts
public void setInsts(int Instances[],
                     boolean value)
          Changes the boolean value at the specified index in the InstIndexes array
Parameters:
index - the index of the instance
value - the value to set at the specified index
 o setAttIndex
public void setAttIndex(int index,
                        boolean value)
          Changes the boolean value at the specified index in the AttIndexes array
Parameters:
index - the index of the instance
value - the value to set at the specified index
 o getInstanceIndex
public boolean getInstanceIndex(int index)
          Returns the boolean value at the specified index in the Instance Index array
Parameters:
index - the index of the instance
 o getSequentialInstanceIndex
public int getSequentialInstanceIndex(int index)
          Returns the boolean value at the specified index in the Sequential Instance Indexes array
Parameters:
index - the index of the instance
 o resetInstanceIndex
public void resetInstanceIndex(boolean value)
          Resets the boolean value in the Instance Indexes array to a specified value
Parameters:
value - the value to set all indexes
 o resetDatasetBasedOn
public void resetDatasetBasedOn(LBR.Indexes FromIndexes)
          Resets the boolean values in Attribute and Instance array to reflect an empty dataset withthe same attributes set as in the incoming Indexes Object
Parameters:
FromIndexes - the Indexes to be copied
 o resetAttIndex
public void resetAttIndex(boolean value)
          Resets the boolean value in AttIndexes array
Parameters:
value - the value to set the attributes to
 o resetAttIndexTo
public void resetAttIndexTo(LBR.Indexes FromIndexes)
          Resets the boolean value in AttIndexes array based on another set of Indexes
Parameters:
FromIndexes - the Indexes to be copied
 o getAttIndex
public boolean getAttIndex(int index)
          Returns the boolean value at the specified index in the Attribute Indexes array
Parameters:
index - the index of the Instance
 o getSequentialAttIndex
public int getSequentialAttIndex(int index)
          Returns the boolean value at the specified index in the Sequential Attribute Indexes array
Parameters:
index - the index of the Attribute
 o getNumInstancesSet
public int getNumInstancesSet()
          Returns the number of instances "in use"
 o getNumInstances
public int getNumInstances()
          Returns the number of instances in the dataset
 o getSequentialNumInstances
public int getSequentialNumInstances()
          Returns the number of instances in the Sequential array
 o getNumAttributes
public int getNumAttributes()
          Returns the number of attributes in the dataset
 o getNumAttributesSet
public int getNumAttributesSet()
          Returns the number of attributes "in use"
 o getSequentialNumAttributes
public int getSequentialNumAttributes()
          Returns the number of attributes in the Sequential array
 o isSequentialInstanceIndexValid
public boolean isSequentialInstanceIndexValid()
          Returns whether or not the Sequential Instance Index requires rebuilding due to a change
 o isSequentialAttIndexValid
public boolean isSequentialAttIndexValid()
          Returns whether or not the Sequential Attribute Index requires rebuilding due to a change
 o setSequentialDataset
public void setSequentialDataset(boolean value)
          Sets both the Instance and Attribute indexes to a specified value
 o setSequentialInstanceIndex
public void setSequentialInstanceIndex(boolean value)
          A Sequential Instance index is all those Instances that are set to the specified value placed in a sequential array. Each value in the sequential array contains the Instance index within the Indexes.
 o setSequentialAttIndex
public void setSequentialAttIndex(boolean value)
          A Sequential Attribute index is all those Attributes that are set to the specified value placed in a sequential array. Each value in the sequential array contains the Attribute index within the Indexes

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home