Class ComplexValue.Float

java.lang.Object
nom.tam.util.ComplexValue
nom.tam.util.ComplexValue.Float
Enclosing class:
ComplexValue

public static final class ComplexValue.Float extends ComplexValue
Single-precision complex values.
Since:
1.18
Author:
Attila Kovacs
  • Nested Class Summary

    Nested classes/interfaces inherited from class ComplexValue

    ComplexValue.Float
    Modifier and Type
    Class
    Description
    static final class 
    Single-precision complex values.
  • Field Summary

    Fields inherited from class ComplexValue

    I, ONE, ZERO
    Modifier and Type
    Field
    Description
    static final ComplexValue
    The unity along the imaginary axis i, or (0.0, 1.0)
    static final ComplexValue
    The complex unity along the real axis, or (1.0, 0.0)
    static final ComplexValue
    The complex zero
  • Constructor Summary

    Constructors
    Constructor
    Description
    Float(float re, float im)
    Instantiates a new single-precision complex number value with the specified real and imaginary components.
    Instantiates a new single-precision complex number value from the string repressentation of it in a FITS header value.
  • Method Summary

    Methods inherited from class ComplexValue

    equals, hashCode, im, isFinite, isZero, re, toBoundedString, toString, toString
    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    final double
    im()
    Returns the imaginary part of this complex value.
    final boolean
    Checks if the complex value is finite.
    final boolean
    Checks if the complex value is zero.
    final double
    re()
    Returns the real part of this complex value.
    toBoundedString(int maxLength)
    Converts this comlex value to its string representation using up to the specified number of characters only.
     
    toString(int decimals)
    Converts this complex value to its string representation with up to the specified number of decimal places showing after the leading figure, for both the real and imaginary parts.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Float

      public Float(float re, float im)
      Instantiates a new single-precision complex number value with the specified real and imaginary components.
      Parameters:
      re - the real part
      im - thei maginary part
      Since:
      1.20
    • Float

      public Float(String str) throws IllegalArgumentException

      Instantiates a new single-precision complex number value from the string repressentation of it in a FITS header value. By default, it will parse complex numbers as a comma-separated pair of real values enclosed in a bracket, such as (1.0, -2.0), or standard real values, such as 123.456 or 123 (as real-only values). There can be any number of spaces around the brackets, number components or the comma.

      Parameters:
      str - the FITS string representation of the complex value
      Throws:
      IllegalArgumentException - if the supplied string does not appear to be a FITS standard representation of a complex value.
      Since:
      1.20