infovis.column
Class Algorithms

java.lang.Object
  extended by infovis.column.Algorithms

public class Algorithms
extends Object

Various algorithms on columns.

Version:
$Revision: 1.4 $
Author:
Jean-Daniel Fekete

Constructor Summary
Algorithms()
           
 
Method Summary
static IntPair computeMinMax(Column c, Permutation perm)
          Computes the index of the minimum and maximum elements contained in a specified column taking into account a Permutation.
static IntPair computeMinMax(Column c, Permutation perm, IntPair p)
          Computes the index of the minimum and maximum elements contained in a specified column taking into account a Permutation.
static IntPair computeMinMax(Column c, RowIterator iter)
          Computes the index of the minimum and maximum elements contained in a specified column taking into account a RowIterator.
static IntPair computeMinMax(Column c, RowIterator iter, IntPair p)
          Computes the index of the minimum and maximum elements contained in a specified column taking into account a RowIterator.
static double incrColumn(NumberColumn col, int row)
          Increments a NumberColumn at a specified row by one, setting it if it is undefined.
static double incrColumn(NumberColumn col, int row, double v)
          Increments a NumberColumn at a specified row by a specified amount, setting it if it is undefined.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Algorithms

public Algorithms()
Method Detail

computeMinMax

public static IntPair computeMinMax(Column c,
                                    Permutation perm,
                                    IntPair p)
Computes the index of the minimum and maximum elements contained in a specified column taking into account a Permutation.

Parameters:
c - the column
perm - the permutation or null
p - a pair of integers that will be returned or null if a fresh one is wanted.
Returns:
a pair of indexes for the minimum and maximum values contained in the column taking into accound the permutation.

computeMinMax

public static IntPair computeMinMax(Column c,
                                    Permutation perm)
Computes the index of the minimum and maximum elements contained in a specified column taking into account a Permutation.

Parameters:
c - the column
perm - the permutation or null
Returns:
a pair of indexes for the minimum and maximum values contained in the column taking into accound the permutation.

computeMinMax

public static IntPair computeMinMax(Column c,
                                    RowIterator iter,
                                    IntPair p)
Computes the index of the minimum and maximum elements contained in a specified column taking into account a RowIterator.

Parameters:
c - the column
iter - the row iterator
p - a pair of integers that will be returned or null if a fresh one is wanted.
Returns:
a pair of indexes for the minimum and maximum values contained in the column taking into accound the row iterator.

computeMinMax

public static IntPair computeMinMax(Column c,
                                    RowIterator iter)
Computes the index of the minimum and maximum elements contained in a specified column taking into account a RowIterator.

Parameters:
c - the column
iter - the row iterator
Returns:
a pair of indexes for the minimum and maximum values contained in the column taking into accound the row iterator.

incrColumn

public static double incrColumn(NumberColumn col,
                                int row,
                                double v)
Increments a NumberColumn at a specified row by a specified amount, setting it if it is undefined.

Parameters:
col - the number column
row - the row
v - the value to add
Returns:
the computed sum

incrColumn

public static double incrColumn(NumberColumn col,
                                int row)
Increments a NumberColumn at a specified row by one, setting it if it is undefined.

Parameters:
col - the number column
row - the row
Returns:
the computed sum


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.