public class org.apache.commons.math.util.MultidimensionalCounter extends java.lang.Object implements java.lang.Iterable
{
private final int dimension;
private final int[] uniCounterOffset;
private final int[] size;
private final int totalSize;
private final int last;
public transient void <init>(int[]) throws org.apache.commons.math.exception.NotStrictlyPositiveException
{
java.lang.Integer v;
int[] v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.commons.math.exception.NotStrictlyPositiveException v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v := @parameter: int[];
specialinvoke v.<java.lang.Object: void <init>()>();
v = lengthof v;
v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension> = v;
v = staticinvoke <org.apache.commons.math.util.MathArrays: int[] copyOf(int[])>(v);
v.<org.apache.commons.math.util.MultidimensionalCounter: int[] size> = v;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
v = newarray (int)[v];
v.<org.apache.commons.math.util.MultidimensionalCounter: int[] uniCounterOffset> = v;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
v = v - 1;
v.<org.apache.commons.math.util.MultidimensionalCounter: int last> = v;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
v = v[v];
v = 0;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
if v >= v goto label;
v = 1;
v = v + 1;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
if v >= v goto label;
v = v[v];
v = v * v;
v = v + 1;
goto label;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] uniCounterOffset>;
v[v] = v;
v = v[v];
v = v * v;
v = v + 1;
goto label;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] uniCounterOffset>;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
v[v] = 0;
if v > 0 goto label;
v = new org.apache.commons.math.exception.NotStrictlyPositiveException;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotStrictlyPositiveException: void <init>(java.lang.Number)>(v);
throw v;
label:
v.<org.apache.commons.math.util.MultidimensionalCounter: int totalSize> = v;
return;
}
public org.apache.commons.math.util.MultidimensionalCounter$Iterator iterator()
{
org.apache.commons.math.util.MultidimensionalCounter$Iterator v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v = new org.apache.commons.math.util.MultidimensionalCounter$Iterator;
specialinvoke v.<org.apache.commons.math.util.MultidimensionalCounter$Iterator: void <init>(org.apache.commons.math.util.MultidimensionalCounter)>(v);
return v;
}
public int getDimension()
{
int v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
return v;
}
public int[] getCounts(int) throws org.apache.commons.math.exception.OutOfRangeException
{
java.lang.Integer v, v, v;
org.apache.commons.math.exception.OutOfRangeException v;
int[] v, v;
int v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v := @parameter: int;
if v < 0 goto label;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int totalSize>;
if v < v goto label;
label:
v = new org.apache.commons.math.exception.OutOfRangeException;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(0);
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int totalSize>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.OutOfRangeException: void <init>(java.lang.Number,java.lang.Number,java.lang.Number)>(v, v, v);
throw v;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
v = newarray (int)[v];
v = 0;
v = 0;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
if v >= v goto label;
v = 0;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] uniCounterOffset>;
v = v[v];
label:
if v > v goto label;
v = v + v;
v = v + 1;
goto label;
label:
v = v - 1;
v = v - v;
v[v] = v;
v = v + 1;
goto label;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
v = v - v;
v[v] = v;
return v;
}
public transient int getCount(int[]) throws org.apache.commons.math.exception.OutOfRangeException, org.apache.commons.math.exception.DimensionMismatchException
{
java.lang.Integer v, v, v;
org.apache.commons.math.exception.OutOfRangeException v;
int[] v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.commons.math.exception.DimensionMismatchException v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v := @parameter: int[];
v = lengthof v;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
if v == v goto label;
v = new org.apache.commons.math.exception.DimensionMismatchException;
v = lengthof v;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
specialinvoke v.<org.apache.commons.math.exception.DimensionMismatchException: void <init>(int,int)>(v, v);
throw v;
label:
v = 0;
v = 0;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
if v >= v goto label;
v = v[v];
if v < 0 goto label;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] size>;
v = v[v];
if v < v goto label;
label:
v = new org.apache.commons.math.exception.OutOfRangeException;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(0);
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] size>;
v = v[v];
v = v - 1;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.OutOfRangeException: void <init>(java.lang.Number,java.lang.Number,java.lang.Number)>(v, v, v);
throw v;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] uniCounterOffset>;
v = v[v];
v = v[v];
v = v * v;
v = v + v;
v = v + 1;
goto label;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int last>;
v = v[v];
v = v + v;
return v;
}
public int getSize()
{
int v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int totalSize>;
return v;
}
public int[] getSizes()
{
int[] v, v;
org.apache.commons.math.util.MultidimensionalCounter v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int[] size>;
v = staticinvoke <org.apache.commons.math.util.MathArrays: int[] copyOf(int[])>(v);
return v;
}
public java.lang.String toString()
{
int[] v;
org.apache.commons.math.util.MultidimensionalCounter v;
int v, v, v;
java.lang.StringBuilder v, v, v;
java.lang.String v;
v := @this: org.apache.commons.math.util.MultidimensionalCounter;
v = new java.lang.StringBuilder;
specialinvoke v.<java.lang.StringBuilder: void <init>()>();
v = 0;
label:
v = v.<org.apache.commons.math.util.MultidimensionalCounter: int dimension>;
if v >= v goto label;
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("[");
v = newarray (int)[1];
v[0] = v;
v = virtualinvoke v.<org.apache.commons.math.util.MultidimensionalCounter: int getCount(int[])>(v);
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(int)>(v);
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("]");
v = v + 1;
goto label;
label:
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.String toString()>();
return v;
}
}