public class BlahutArimoto
extends java.lang.Object
| Constructor and Description |
|---|
BlahutArimoto(Channel channel,
double[] inputPMF_Q,
double acceptableError,
int noOfiterations)
Sets initial data to calculates the capacity.
|
BlahutArimoto(Channel channel,
double acceptableError,
int noOfiterations)
Sets initial data to calculates the capacity.
|
BlahutArimoto(java.lang.String[] inputNames,
java.lang.String[] outputNames,
double[][] channelMatrix_W,
double[] inputPMF_Q,
double acceptableError,
int noOfiterations)
Sets initial data to calculates the capacity.
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculateCapacity()
Calculates capacity.
|
double |
calculateError(double[] inputProbs_Q,
double[][] matrix_W)
Finds the maximum possible error for a input PMF using:
I(Q,W) ≤ true Cap ≤ max_x[T(x) -log(Q(x))] i.e. |
double |
getAcceptableError()
Returns the acceptable error of the result.
|
double |
getCapacity()
Returns the capacity.
|
int |
getIterationCount()
Returns the number of iterations in Blahut-Arimoto algorithm.
|
double[] |
getMaxInputDist()
Returns the input distribution that achieves capacity.
|
double |
getPossibleError()
Returns the possible error of the result.
|
void |
setVerbose(boolean b)
Sets the value of verbose.
|
public BlahutArimoto(Channel channel, double[] inputPMF_Q, double acceptableError, int noOfiterations)
channel - channelinputPMF_Q - input PMF arrayacceptableError - acceptable error rate for the calculation of capacitynoOfiterations - the maximum number of iterations to calculate of capacitypublic BlahutArimoto(Channel channel, double acceptableError, int noOfiterations)
channel - channelacceptableError - acceptable error rate for the calculation of capacitynoOfiterations - the maximum number of iterations to calculate of capacitypublic BlahutArimoto(java.lang.String[] inputNames,
java.lang.String[] outputNames,
double[][] channelMatrix_W,
double[] inputPMF_Q,
double acceptableError,
int noOfiterations)
inputNames - input namesoutputNames - output nameschannelMatrix_W - channel matrixinputPMF_Q - input PMF arrayacceptableError - acceptable error rate for the calculation of capacitynoOfiterations - the maximum number of iterations to calculate of capacitypublic double calculateCapacity()
public double calculateError(double[] inputProbs_Q,
double[][] matrix_W)
inputProbs_Q - input PMFmatrix_W - channel matrixpublic double getAcceptableError()
public double getCapacity()
public int getIterationCount()
public double[] getMaxInputDist()
public double getPossibleError()
public void setVerbose(boolean b)
b - the value of verbose