infomat.algorithms.reduction
Class SizeReducer

java.lang.Object
  extended by infomat.algorithms.reduction.SizeReducer
All Implemented Interfaces:
HasProperties

public class SizeReducer
extends java.lang.Object
implements HasProperties

Reduces the IObjectGroup:s of a IObjectGrouping to the same number of objects per IObjectGroup as in another IObjectGrouping.


Field Summary
private  Properties properties
           
private static int reductionNumber
           
 
Constructor Summary
SizeReducer()
           
SizeReducer(Properties properties)
           
 
Method Summary
 Properties getDefaultProperties()
           
 Properties getProperties()
           
 java.lang.Object getPropertyValue(java.lang.String name)
           
 IObjectGroup reduceGroup(IObjectGroup iog, IObjectGroup compareIOG)
          Makes a new IObjectGroup that consists of a random subset of the original objects.
 IObjectGrouping reduceGrouping(IObjectGrouping ioging, IObjectGrouping compareGrouping)
          Note: does not handle missing zero-sized groups!!!
 void setProperties(Properties properties)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reductionNumber

private static int reductionNumber

properties

private Properties properties
Constructor Detail

SizeReducer

public SizeReducer()

SizeReducer

public SizeReducer(Properties properties)
Method Detail

getDefaultProperties

public Properties getDefaultProperties()
Specified by:
getDefaultProperties in interface HasProperties

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)
Specified by:
getPropertyValue in interface HasProperties

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws PropertyNotFoundException
Specified by:
setProperty in interface HasProperties
Throws:
PropertyNotFoundException

getProperties

public Properties getProperties()
Specified by:
getProperties in interface HasProperties

setProperties

public void setProperties(Properties properties)
Specified by:
setProperties in interface HasProperties

reduceGrouping

public IObjectGrouping reduceGrouping(IObjectGrouping ioging,
                                      IObjectGrouping compareGrouping)
Note: does not handle missing zero-sized groups!!!


reduceGroup

public IObjectGroup reduceGroup(IObjectGroup iog,
                                IObjectGroup compareIOG)
Makes a new IObjectGroup that consists of a random subset of the original objects.