# Class DoubleComplex

java.lang.Object
mpi.DoubleComplex

public final class DoubleComplex extends Object
This class wraps a complex number stored in a buffer.

## Method Summary

Modifier and Type
Method
Description
`static DoubleComplex`
`get(double[] array)`
Wraps a complex number stored in the first two values of an array.
`static DoubleComplex`
`get(double[] array, int index)`
Wraps the complex number at the specified position of an array of complex numbers stored in an array of doubles.
`static DoubleComplex`
`get(ByteBuffer buffer)`
Wraps a complex number stored in a buffer
`static DoubleComplex`
`get(ByteBuffer buffer, int index)`
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.
`static DoubleComplex`
`get(DoubleBuffer buffer)`
Wraps a complex number stored in a buffer
`static DoubleComplex`
`get(DoubleBuffer buffer, int index)`
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.
`DoubleBuffer`
`getBuffer()`
Gets the buffer where the complex number is stored.
`double`
`getImag()`
Gets the imaginary value.
`double`
`getReal()`
Gets the real value.
`void`
`putImag(double imag)`
Puts the imaginary value.
`void`
`putReal(double real)`
Puts the real value.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### get

public static DoubleComplex get(DoubleBuffer buffer)
Wraps a complex number stored in a buffer

Parameters:
  `buffer` - buffer
Returns:
  complex number

### get

public static DoubleComplex get(DoubleBuffer buffer, int index)
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.

Parameters:
  `buffer` - buffer
  `index` - index
Returns:
  complex number

### get

public static DoubleComplex get(double[] array)
Wraps a complex number stored in the first two values of an array.

Parameters:
  `array` - array
Returns:
  complex number

### get

public static DoubleComplex get(double[] array, int index)
Wraps the complex number at the specified position of an array of complex numbers stored in an array of doubles.

Parameters:
  `array` - array
  `index` - index
Returns:
  complex number

### get

public static DoubleComplex get(ByteBuffer buffer)
Wraps a complex number stored in a buffer

Parameters:
  `buffer` - buffer
Returns:
  complex number

### get

public static DoubleComplex get(ByteBuffer buffer, int index)
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.

Parameters:
  `buffer` - buffer
  `index` - index
Returns:
  complex number

### getReal

public double getReal()
Gets the real value.

Returns:
  real value

### getImag

public double getImag()
Gets the imaginary value.

Returns:
  imaginary value.

### putReal

public void putReal(double real)
Puts the real value.

Parameters:
  `real` - real value

### putImag

public void putImag(double imag)
Puts the imaginary value.

Parameters:
  `imag` - imaginary value

### getBuffer

public DoubleBuffer getBuffer()
Gets the buffer where the complex number is stored.

Returns:
  buffer where the complex number is stored