org.apache.poi.hssf.record.formula.functions
Class Mode

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.functions.Mode
All Implemented Interfaces:
Function

public class Mode
extends java.lang.Object
implements Function

Author:
Amol S. Deshmukh < amolweb at ya hoo dot com >

Constructor Summary
Mode()
           
 
Method Summary
static double evaluate(double[] v)
          if v is zero length or contains no duplicates, return value is Double.NaN.
 Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mode

public Mode()
Method Detail

evaluate

public static double evaluate(double[] v)
                       throws EvaluationException
if v is zero length or contains no duplicates, return value is Double.NaN. Else returns the value that occurs most times and if there is a tie, returns the first such value.

Parameters:
v -
Throws:
EvaluationException

evaluate

public Eval evaluate(Eval[] args,
                     int srcCellRow,
                     short srcCellCol)
Specified by:
evaluate in interface Function


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.