## org.jscience.computing Class ComputingUtils

```java.lang.Object
org.jscience.computing.ComputingUtils
```

`public final class ComputingUtilsextends java.lang.Object`

A class representing some useful methods for computing science

Constructor Summary
`ComputingUtils()`

Method Summary
` double` ```getAmdahlParallelSpeedup(double f, double n)```
The Amdahl law for parallel operations, see http://en.wikipedia.org/wiki/Amdahl%27s_law
` double` ```getAmdahlSpeedup(double p, double s)```
The Amdahl law for sequential operations, see http://en.wikipedia.org/wiki/Amdahl%27s_law
` double` `getBinaryEntropy(DoubleVector vector)`
The Shannon binary entropy, see http://en.wikipedia.org/wiki/Information_theory, where we use ln instead of log Each value of the Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils
` double` `getEntropy(DoubleVector vector)`
The Shannon entropy, see http://en.wikipedia.org/wiki/Information_theory Each value of the Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils
` double` ```getMutualInformation(DoubleVector vectorX, DoubleVector vectorY, DoubleMatrix matrix)```
The Shannon mutual information, see http://en.wikipedia.org/wiki/Information_theory Each value of the Matrix should be between 0 and 1, although this is unchecked Each value of each Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComputingUtils

`public ComputingUtils()`
Method Detail

### getAmdahlSpeedup

```public final double getAmdahlSpeedup(double p,
double s)```
The Amdahl law for sequential operations, see http://en.wikipedia.org/wiki/Amdahl%27s_law

Parameters:
`p` - DOCUMENT ME!
`s` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### getAmdahlParallelSpeedup

```public final double getAmdahlParallelSpeedup(double f,
double n)```
The Amdahl law for parallel operations, see http://en.wikipedia.org/wiki/Amdahl%27s_law

Parameters:
`f` - DOCUMENT ME!
`n` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### getEntropy

`public final double getEntropy(DoubleVector vector)`
The Shannon entropy, see http://en.wikipedia.org/wiki/Information_theory Each value of the Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils

Parameters:
`vector` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### getBinaryEntropy

`public final double getBinaryEntropy(DoubleVector vector)`
The Shannon binary entropy, see http://en.wikipedia.org/wiki/Information_theory, where we use ln instead of log Each value of the Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils

Parameters:
`vector` - DOCUMENT ME!
Returns:
DOCUMENT ME!

### getMutualInformation

```public final double getMutualInformation(DoubleVector vectorX,
DoubleVector vectorY,
DoubleMatrix matrix)```
The Shannon mutual information, see http://en.wikipedia.org/wiki/Information_theory Each value of the Matrix should be between 0 and 1, although this is unchecked Each value of each Vector should be between 0 and 1, although this is unchecked See also org.jscience.mathematics.statistics.EngineerMathUtils

Parameters:
`vectorX` - DOCUMENT ME!
`vectorY` - DOCUMENT ME!
`matrix` - DOCUMENT ME!
Returns:
DOCUMENT ME!