Class DenseInstanceData

    • Field Detail

      • attributeValues

        protected double[] attributeValues
        The attribute values.
    • Constructor Detail

      • DenseInstanceData

        public DenseInstanceData​(double[] array)
        Instantiates a new dense instance data.
        Parameters:
        array - the array
      • DenseInstanceData

        public DenseInstanceData​(int length)
        Instantiates a new dense instance data.
        Parameters:
        length - the length
      • DenseInstanceData

        public DenseInstanceData()
        Instantiates a new dense instance data.
    • Method Detail

      • numAttributes

        public int numAttributes()
        Num attributes.
        Specified by:
        numAttributes in interface InstanceData
        Returns:
        the int
      • value

        public double value​(int indexAttribute)
        Value.
        Specified by:
        value in interface InstanceData
        Parameters:
        indexAttribute - the index attribute
        Returns:
        the double
      • isMissing

        public boolean isMissing​(int indexAttribute)
        Checks if is missing.
        Specified by:
        isMissing in interface InstanceData
        Parameters:
        indexAttribute - the index attribute
        Returns:
        true, if is missing
      • numValues

        public int numValues()
        Num values.
        Specified by:
        numValues in interface InstanceData
        Returns:
        the int
      • index

        public int index​(int indexAttribute)
        Index.
        Specified by:
        index in interface InstanceData
        Parameters:
        indexAttribute - the index attribute
        Returns:
        the int
      • valueSparse

        public double valueSparse​(int indexAttribute)
        Value sparse.
        Specified by:
        valueSparse in interface InstanceData
        Parameters:
        indexAttribute - the index attribute
        Returns:
        the double
      • isMissingSparse

        public boolean isMissingSparse​(int indexAttribute)
        Checks if is missing sparse.
        Specified by:
        isMissingSparse in interface InstanceData
        Parameters:
        indexAttribute - the index attribute
        Returns:
        true, if is missing sparse
      • toDoubleArray

        public double[] toDoubleArray()
        To double array.
        Specified by:
        toDoubleArray in interface InstanceData
        Returns:
        the double[]
      • setValue

        public void setValue​(int attributeIndex,
                             double d)
        Sets the value.
        Specified by:
        setValue in interface InstanceData
        Parameters:
        attributeIndex - the attribute index
        d - the d
      • deleteAttributeAt

        public void deleteAttributeAt​(int index)
        Description copied from interface: InstanceData
        Deletes an attribute.
        Specified by:
        deleteAttributeAt in interface InstanceData
        Parameters:
        index - the indes
      • insertAttributeAt

        public void insertAttributeAt​(int index)
        Description copied from interface: InstanceData
        Inserts an attribute.
        Specified by:
        insertAttributeAt in interface InstanceData
        Parameters:
        index - the indes
      • copy

        public InstanceData copy()
        Description copied from interface: InstanceData
        Produces a shallow copy of this instance data.
        Specified by:
        copy in interface InstanceData
        Returns:
        the shallow copy