org.apache.mahout.math.jet.math
Class IntFunctions

java.lang.Object
  extended by org.apache.mahout.math.jet.math.IntFunctions

Deprecated. until unit tests are in place. Until this time, this class/interface is unsupported.

@Deprecated
public class IntFunctions
extends java.lang.Object


Field Summary
static IntFunction abs
          Deprecated. Function that returns Math.abs(a) == (a < 0) ? -a : a.
static IntIntFunction and
          Deprecated. Function that returns a & b.
static IntIntFunction compare
          Deprecated. Function that returns a < b ? -1 : a > b ? 1 : 0.
static IntIntFunction div
          Deprecated. Function that returns a / b.
static IntIntFunction equals
          Deprecated. Function that returns a == b ? 1 : 0.
static IntFunction identity
          Deprecated. Function that returns its argument.
static IntIntFunction max
          Deprecated. Function that returns Math.max(a,b).
static IntIntFunction min
          Deprecated. Function that returns Math.min(a,b).
static IntIntFunction minus
          Deprecated. Function that returns a - b.
static IntIntFunction mult
          Deprecated. Function that returns a * b.
static IntFunction not
          Deprecated. Function that returns ~a.
static IntIntFunction or
          Deprecated. Function that returns a | b.
static IntIntFunction plus
          Deprecated. Function that returns a + b.
static IntIntFunction pow
          Deprecated. Function that returns (int) Math.pow(a,b).
static IntFunction sign
          Deprecated. Function that returns a < 0 ? -1 : a > 0 ? 1 : 0.
static IntFunction square
          Deprecated. Function that returns a * a.
 
Method Summary
static IntFunction and(int b)
          Deprecated. Constructs a function that returns a & b.
static IntFunction between(int from, int to)
          Deprecated. Constructs a function that returns (from<=a && a<=to) ? 1 : 0.
static IntFunction chain(IntFunction g, IntFunction h)
          Deprecated. Constructs the function g( h(a) ).
static IntIntFunction chain(IntFunction g, IntIntFunction h)
          Deprecated. Constructs the function g( h(a,b) ).
static IntIntFunction chain(IntIntFunction f, IntFunction g, IntFunction h)
          Deprecated. Constructs the function f( g(a), h(b) ).
static IntFunction compare(int b)
          Deprecated. Constructs a function that returns a < b ? -1 : a > b ? 1 : 0.
static IntFunction constant(int c)
          Deprecated. Constructs a function that returns the constant c.
static IntFunction div(int b)
          Deprecated. Constructs a function that returns a / b.
static IntFunction equals(int b)
          Deprecated. Constructs a function that returns a == b ? 1 : 0.
static IntFunction max(int b)
          Deprecated. Constructs a function that returns Math.max(a,b).
static IntFunction min(int b)
          Deprecated. Constructs a function that returns Math.min(a,b).
static IntFunction minus(int b)
          Deprecated. Constructs a function that returns a - b.
static IntFunction mult(int b)
          Deprecated. Constructs a function that returns a * b.
static IntFunction or(int b)
          Deprecated. Constructs a function that returns a | b.
static IntFunction plus(int b)
          Deprecated. Constructs a function that returns a + b.
static IntFunction pow(int b)
          Deprecated. Constructs a function that returns (int) Math.pow(a,b).
static IntFunction random()
          Deprecated. Constructs a function that returns a 32 bit uniformly distributed random number in the closed interval [Integer.MIN_VALUE,Integer.MAX_VALUE] (including Integer.MIN_VALUE and Integer.MAX_VALUE).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

abs

public static final IntFunction abs
Deprecated. 
Function that returns Math.abs(a) == (a < 0) ? -a : a.


identity

public static final IntFunction identity
Deprecated. 
Function that returns its argument.


not

public static final IntFunction not
Deprecated. 
Function that returns ~a.


sign

public static final IntFunction sign
Deprecated. 
Function that returns a < 0 ? -1 : a > 0 ? 1 : 0.


square

public static final IntFunction square
Deprecated. 
Function that returns a * a.


and

public static final IntIntFunction and
Deprecated. 
Function that returns a & b.


compare

public static final IntIntFunction compare
Deprecated. 
Function that returns a < b ? -1 : a > b ? 1 : 0.


div

public static final IntIntFunction div
Deprecated. 
Function that returns a / b.


equals

public static final IntIntFunction equals
Deprecated. 
Function that returns a == b ? 1 : 0.


max

public static final IntIntFunction max
Deprecated. 
Function that returns Math.max(a,b).


min

public static final IntIntFunction min
Deprecated. 
Function that returns Math.min(a,b).


minus

public static final IntIntFunction minus
Deprecated. 
Function that returns a - b.


mult

public static final IntIntFunction mult
Deprecated. 
Function that returns a * b.


or

public static final IntIntFunction or
Deprecated. 
Function that returns a | b.


plus

public static final IntIntFunction plus
Deprecated. 
Function that returns a + b.


pow

public static final IntIntFunction pow
Deprecated. 
Function that returns (int) Math.pow(a,b).

Method Detail

and

public static IntFunction and(int b)
Deprecated. 
Constructs a function that returns a & b. a is a variable, b is fixed.


between

public static IntFunction between(int from,
                                  int to)
Deprecated. 
Constructs a function that returns (from<=a && a<=to) ? 1 : 0. a is a variable, from and to are fixed.


chain

public static IntFunction chain(IntFunction g,
                                IntFunction h)
Deprecated. 
Constructs the function g( h(a) ).

Parameters:
g - a unary function.
h - a unary function.
Returns:
the unary function g( h(a) ).

chain

public static IntIntFunction chain(IntFunction g,
                                   IntIntFunction h)
Deprecated. 
Constructs the function g( h(a,b) ).

Parameters:
g - a unary function.
h - a binary function.
Returns:
the unary function g( h(a,b) ).

chain

public static IntIntFunction chain(IntIntFunction f,
                                   IntFunction g,
                                   IntFunction h)
Deprecated. 
Constructs the function f( g(a), h(b) ).

Parameters:
f - a binary function.
g - a unary function.
h - a unary function.
Returns:
the binary function f( g(a), h(b) ).

compare

public static IntFunction compare(int b)
Deprecated. 
Constructs a function that returns a < b ? -1 : a > b ? 1 : 0. a is a variable, b is fixed.


constant

public static IntFunction constant(int c)
Deprecated. 
Constructs a function that returns the constant c.


div

public static IntFunction div(int b)
Deprecated. 
Constructs a function that returns a / b. a is a variable, b is fixed.


equals

public static IntFunction equals(int b)
Deprecated. 
Constructs a function that returns a == b ? 1 : 0. a is a variable, b is fixed.


max

public static IntFunction max(int b)
Deprecated. 
Constructs a function that returns Math.max(a,b). a is a variable, b is fixed.


min

public static IntFunction min(int b)
Deprecated. 
Constructs a function that returns Math.min(a,b). a is a variable, b is fixed.


minus

public static IntFunction minus(int b)
Deprecated. 
Constructs a function that returns a - b. a is a variable, b is fixed.


mult

public static IntFunction mult(int b)
Deprecated. 
Constructs a function that returns a * b. a is a variable, b is fixed.


or

public static IntFunction or(int b)
Deprecated. 
Constructs a function that returns a | b. a is a variable, b is fixed.


plus

public static IntFunction plus(int b)
Deprecated. 
Constructs a function that returns a + b. a is a variable, b is fixed.


pow

public static IntFunction pow(int b)
Deprecated. 
Constructs a function that returns (int) Math.pow(a,b). a is a variable, b is fixed.


random

public static IntFunction random()
Deprecated. 
Constructs a function that returns a 32 bit uniformly distributed random number in the closed interval [Integer.MIN_VALUE,Integer.MAX_VALUE] (including Integer.MIN_VALUE and Integer.MAX_VALUE). Currently the engine is MersenneTwister and is seeded with the current time.

Note that any random engine derived from RandomEngine and any random distribution derived from AbstractDistribution are function objects, because they implement the proper interfaces. Thus, if you are not happy with the default, just pass your favourite random generator to function evaluating methods.



Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.