nars.inference
Class UtilityFunctions

java.lang.Object
  extended by nars.inference.UtilityFunctions
Direct Known Subclasses:
BudgetFunctions, TruthFunctions

public class UtilityFunctions
extends java.lang.Object

Common functions on real numbers, mostly in [0,1].


Constructor Summary
UtilityFunctions()
           
 
Method Summary
static float and(float... arr)
          A function where the output is conjunctively determined by the inputs
static float aveAri(float... arr)
          A function where the output is the arithmetic average the inputs
static float aveGeo(float... arr)
          A function where the output is the geometric average the inputs
static float or(float... arr)
          A function where the output is disjunctively determined by the inputs
static float w2c(float w)
          A function to convert weight to confidence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtilityFunctions

public UtilityFunctions()
Method Detail

and

public static float and(float... arr)
A function where the output is conjunctively determined by the inputs

Parameters:
arr - The inputs, each in [0, 1]
Returns:
The output that is no larger than each input

or

public static float or(float... arr)
A function where the output is disjunctively determined by the inputs

Parameters:
arr - The inputs, each in [0, 1]
Returns:
The output that is no smaller than each input

aveAri

public static float aveAri(float... arr)
A function where the output is the arithmetic average the inputs

Parameters:
arr - The inputs, each in [0, 1]
Returns:
The arithmetic average the inputs

aveGeo

public static float aveGeo(float... arr)
A function where the output is the geometric average the inputs

Parameters:
arr - The inputs, each in [0, 1]
Returns:
The geometric average the inputs

w2c

public static float w2c(float w)
A function to convert weight to confidence

Parameters:
w - Weight of evidence, a non-negative real number
Returns:
The corresponding confidence, in [0, 1)