weka.filters.supervised.attribute.gpattributegeneration
Class Function

java.lang.Object
  extended by weka.filters.supervised.attribute.gpattributegeneration.Function

public class Function
extends java.lang.Object

Class to contain list of supported functions and their properties (such as arity)

Author:
Colin Noakes

Field Summary
static java.lang.String HELP_ALL_FUNCTIONS
           
 
Constructor Summary
Function()
           
 
Method Summary
static int arity(java.lang.String func)
          An integer denoting the arity of the given function
static java.util.ArrayList<java.lang.String> getBinaryFuncSet(java.util.ArrayList<java.lang.String> funcSet)
          Generates and returns a binary ArrayList from a complete array list
static java.util.ArrayList<java.lang.String> getUnaryFuncSet(java.util.ArrayList<java.lang.String> funcSet)
          Generates and returns a unary ArrayList from a complete array list
static boolean isUnary(java.lang.String func)
          Checks whether the function is unary or binary
static boolean isValid(java.lang.String func)
          Checks the function is on the allowed list of functions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP_ALL_FUNCTIONS

public static final java.lang.String HELP_ALL_FUNCTIONS
See Also:
Constant Field Values
Constructor Detail

Function

public Function()
Method Detail

isValid

public static boolean isValid(java.lang.String func)
Checks the function is on the allowed list of functions.

Parameters:
func - The function to test
Returns:
True if function is valid; false if not

isUnary

public static boolean isUnary(java.lang.String func)
Checks whether the function is unary or binary

Parameters:
func - The function to test
Returns:
True if function is Unary; false if not

arity

public static int arity(java.lang.String func)
An integer denoting the arity of the given function

Parameters:
func - The function to find out the arity of
Returns:
The arity of the specified function

getUnaryFuncSet

public static java.util.ArrayList<java.lang.String> getUnaryFuncSet(java.util.ArrayList<java.lang.String> funcSet)
Generates and returns a unary ArrayList from a complete array list

Parameters:
funcSet - The complete array list to make a unary function list out of
Returns:
Unary ArrayList of functions

getBinaryFuncSet

public static java.util.ArrayList<java.lang.String> getBinaryFuncSet(java.util.ArrayList<java.lang.String> funcSet)
Generates and returns a binary ArrayList from a complete array list

Parameters:
funcSet - The complete array list to make a binary function list out of
Returns:
Binary ArrayList of functions