n-th roots of
unity.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | isCounterClockWise
|
| private int | omegaCount
Number of roots of unity. |
| private double[] | omegaImaginaryClockwise
Imaginary part of the |
| private double[] | omegaImaginaryCounterClockwise
Imaginary part of the |
| private double[] | omegaReal
Real part of the roots. |
| private static final long | serialVersionUID
Serializable version id. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | computeRoots(int
the (signed) number of roots of unity to be computed n)
Computes the |
| public synchronized double | Returns: imaginary part of thek-th n-th root of unityindex of the k)n-th root of unityGet the imaginary part of the |
| public synchronized int | Returns: the number of roots of unity currently storedReturns the number of roots of unity currently stored. |
| public synchronized double | Returns: real part of thek-th n-th root of unityindex of the k)n-th root of unityGet the real part of the |
| public synchronized boolean | Returns: true if the roots of unity are stored in
counter-clockwise orderReturns |
| isCounterClockWise | back to summary |
|---|---|
| private boolean isCounterClockWise
| |
| omegaCount | back to summary |
|---|---|
| private int omegaCount Number of roots of unity. | |
| omegaImaginaryClockwise | back to summary |
|---|---|
| private double[] omegaImaginaryClockwise Imaginary part of the | |
| omegaImaginaryCounterClockwise | back to summary |
|---|---|
| private double[] omegaImaginaryCounterClockwise Imaginary part of the | |
| omegaReal | back to summary |
|---|---|
| private double[] omegaReal Real part of the roots. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version id. | |
| RootsOfUnity | back to summary |
|---|---|
| public RootsOfUnity() Build an engine for computing the | |
| computeRoots | back to summary |
|---|---|
| public synchronized void computeRoots(int n) throws ZeroException
Computes the
Note that
| |
| getImaginary | back to summary |
|---|---|
| public synchronized double getImaginary(int k) throws MathIllegalStateException, OutOfRangeException Get the imaginary part of the
| |
| getNumberOfRoots | back to summary |
|---|---|
| public synchronized int getNumberOfRoots() Returns the number of roots of unity currently stored. If
| |
| getReal | back to summary |
|---|---|
| public synchronized double getReal(int k) throws MathIllegalStateException, MathIllegalArgumentException Get the real part of the
| |
| isCounterClockWise | back to summary |
|---|---|
| public synchronized boolean isCounterClockWise() throws MathIllegalStateException Returns
| |