nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.instanceFactories
Class DoubleArrayInstanceFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.instanceFactories.DoubleArrayInstanceFactory
All Implemented Interfaces:
InstanceFactory

public class DoubleArrayInstanceFactory
extends java.lang.Object
implements InstanceFactory

Class for transforming double[] property values into an Instance. If the array is null or of zero length, an Instance is returned with no attributes. If the array has length greater than zero, each element of the array becomes an attribute named as 'name':'index' with the appropriate array value as its value.


Constructor Summary
DoubleArrayInstanceFactory()
           
 
Method Summary
 weka.core.Instance transform(java.lang.Object value, java.lang.String name)
          Transform an object into an Instance where the name of the dataset and the names of the attributes are derived from the name provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleArrayInstanceFactory

public DoubleArrayInstanceFactory()
Method Detail

transform

public weka.core.Instance transform(java.lang.Object value,
                                    java.lang.String name)
Description copied from interface: InstanceFactory
Transform an object into an Instance where the name of the dataset and the names of the attributes are derived from the name provided.

Specified by:
transform in interface InstanceFactory
Parameters:
value - Property value to be transformed
name - string utilized to derive a dataset name and attribute names.
Returns:
Instance representing this object