com.compomics.util.math
Class BasicMathFunctions

java.lang.Object
  extended by com.compomics.util.math.BasicMathFunctions

public class BasicMathFunctions
extends java.lang.Object

Class used to perform basic mathematical functions

Author:
Marc

Constructor Summary
BasicMathFunctions()
           
 
Method Summary
static int factorial(int n)
          returns n!
static double getCombination(int k, int n)
          Returns the number of k-combinations in a set of n elements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicMathFunctions

public BasicMathFunctions()
Method Detail

factorial

public static int factorial(int n)
returns n!

Parameters:
n - a given integer
Returns:
the corresponding factorial

getCombination

public static double getCombination(int k,
                                    int n)
Returns the number of k-combinations in a set of n elements

Parameters:
k -
n -
Returns:


Copyright © 2011. All Rights Reserved.