infomat.algorithms.reduction
Class SizeReducer

java.lang.Object
  extended by infomat.algorithms.reduction.SizeReducer

public class SizeReducer
extends java.lang.Object

Reduces IObjectGroups and IObjectGroupings compared to an other. The class can reduce both in order of the IObject:s in each IObjectGroup or in random order.


Field Summary
(package private)  Properties properties
           
 
Constructor Summary
SizeReducer()
           
SizeReducer(Properties properties)
           
 
Method Summary
 Properties getDefaultProperties()
           
 Properties getProperties()
           
 java.lang.Object getPropertyValue(java.lang.String name)
           
static IObjectGrouping reduceGroupingToSizeOfOtherGroupingInOrder(IObjectGrouping ioging, IObjectGrouping redIOGING, IMatrix matrix)
          Note: does not handle missing zero-sized groups!!!
static IObjectGrouping reduceGroupingToSizeOfOtherGroupingRandomly(IObjectGrouping ioging, IObjectGrouping redIOGING, IMatrix matrix)
          Note: does not handle missing zero-sized groups!!!
static IObjectGroup reduceGroupToSizeOfOtherGroupInOrder(IObjectGroup iog, IObjectGroup redIOG)
          Makes a new IObjectGroup that consists of the top IObject:s of "iog".
static IObjectGroup reduceGroupToSizeOfOtherGroupRandomly(IObjectGroup iog, IObjectGroup redIOG)
          Makes a new IObjectGroup that consists of the top IObject:s of "iog".
 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

properties

Properties properties
Constructor Detail

SizeReducer

public SizeReducer()

SizeReducer

public SizeReducer(Properties properties)
Method Detail

getDefaultProperties

public Properties getDefaultProperties()

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws PropertyNotFoundException
Throws:
PropertyNotFoundException

getProperties

public Properties getProperties()

setProperties

public void setProperties(Properties properties)

reduceGroupingToSizeOfOtherGroupingInOrder

public static IObjectGrouping reduceGroupingToSizeOfOtherGroupingInOrder(IObjectGrouping ioging,
                                                                         IObjectGrouping redIOGING,
                                                                         IMatrix matrix)
Note: does not handle missing zero-sized groups!!!


reduceGroupToSizeOfOtherGroupInOrder

public static IObjectGroup reduceGroupToSizeOfOtherGroupInOrder(IObjectGroup iog,
                                                                IObjectGroup redIOG)
Makes a new IObjectGroup that consists of the top IObject:s of "iog". As many as there are in the "redIOG". Currently produces error if the group to reduce is smaller than the group with the proposed size.


reduceGroupingToSizeOfOtherGroupingRandomly

public static IObjectGrouping reduceGroupingToSizeOfOtherGroupingRandomly(IObjectGrouping ioging,
                                                                          IObjectGrouping redIOGING,
                                                                          IMatrix matrix)
Note: does not handle missing zero-sized groups!!!


reduceGroupToSizeOfOtherGroupRandomly

public static IObjectGroup reduceGroupToSizeOfOtherGroupRandomly(IObjectGroup iog,
                                                                 IObjectGroup redIOG)
Makes a new IObjectGroup that consists of the top IObject:s of "iog". As many as there are in the "redIOG". Currently produces error if the group to reduce is smaller than the group with the proposed size.