Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
Complex Class Reference

Public Member Functions

 Complex (double real, double imaginary)
 
Complex add (Complex other)
 
Complex subtract (Complex other)
 
Complex multiply (Complex other)
 
Complex reciprocal ()
 
Complex negate ()
 
Complex conjugate ()
 
Complex divide (Complex other)
 
String toString ()
 
 Complex (float real, float imaginary)
 
float getReal ()
 
float getImag ()
 
Complex add (Complex other)
 
Complex subtract (Complex other)
 
Complex multiply (Complex other)
 
Complex reciprocal ()
 
Complex negate ()
 
Complex divide (Complex other)
 
String toString ()
 
 Complex (float real, float imaginary)
 
float getReal ()
 
float getImag ()
 
Complex add (Complex other)
 
Complex subtract (Complex other)
 
Complex multiply (Complex other)
 
Complex reciprocal ()
 
Complex negate ()
 
Complex divide (Complex other)
 
String toString ()
 

Static Public Member Functions

static Complex fromString (String s)
 
static Complex fromString (String s)
 
static int findMax (int[] array)
 
static Complex fromString (String s)
 
static int findMax (int[] array)
 

Public Attributes

double real
 
double imaginary
 

Private Attributes

float real
 
float imaginary
 

Detailed Description

This class defines utility functions for handling complex numbers. Functions:

Constructor & Destructor Documentation

◆ Complex() [1/3]

Complex.Complex ( double  real,
double  imaginary 
)

◆ Complex() [2/3]

Complex.Complex ( float  real,
float  imaginary 
)

Constructor of complex class.

Parameters
realReal part of the complex number.
imaginaryImaginary part of the complex number.

◆ Complex() [3/3]

Complex.Complex ( float  real,
float  imaginary 
)

Constructor of complex class.

Parameters
realReal part of the complex number.
imaginaryImaginary part of the complex number.

Member Function Documentation

◆ add() [1/3]

Complex Complex.add ( Complex  other)

◆ add() [2/3]

Complex Complex.add ( Complex  other)

Adds this complex number to another.

Parameters
otherthe complex number to add.
Returns
the sum of this complex number and the other.

◆ add() [3/3]

Complex Complex.add ( Complex  other)

Adds this complex number to another.

Parameters
otherthe complex number to add.
Returns
the sum of this complex number and the other.

◆ conjugate()

Complex Complex.conjugate ( )

◆ divide() [1/3]

Complex Complex.divide ( Complex  other)

◆ divide() [2/3]

Complex Complex.divide ( Complex  other)

Divides this complex number by another.

Parameters
otherthe complex number to divide by.
Returns
the quotient of this complex number and the other.

◆ divide() [3/3]

Complex Complex.divide ( Complex  other)

Divides this complex number by another.

Parameters
otherthe complex number to divide by.
Returns
the quotient of this complex number and the other.

◆ findMax() [1/2]

static int Complex.findMax ( int[]  array)
static

Finds the maximum number in the array.

Parameters
arraythe array to find the maximum number in.
Returns
the maximum number in the array.

◆ findMax() [2/2]

static int Complex.findMax ( int[]  array)
static

Finds the maximum number in the array.

Parameters
arraythe array to find the maximum number in.
Returns
the maximum number in the array.

◆ fromString() [1/3]

static Complex Complex.fromString ( String  s)
static

◆ fromString() [2/3]

static Complex Complex.fromString ( String  s)
static

Creates an object of complex class using the input string. The input string should be in the form a+bj where 'a' and 'b' are floats.

Parameters
sInput string of the form a+bj.
Returns
a Complex object representing the complex number.
Exceptions
IllegalArgumentExceptionif the input string is not in the correct format.

◆ fromString() [3/3]

static Complex Complex.fromString ( String  s)
static

Creates an object of complex class using the input string. The input string should be in the form a+bj where 'a' and 'b' are floats.

Parameters
sInput string of the form a+bj.
Returns
a Complex object representing the complex number.
Exceptions
IllegalArgumentExceptionif the input string is not in the correct format.

◆ getImag() [1/2]

float Complex.getImag ( )

Returns the imaginary part of the complex number. Complex#imaginary

Returns
the imaginary part of the complex number.

◆ getImag() [2/2]

float Complex.getImag ( )

Returns the imaginary part of the complex number. Complex#imaginary

Returns
the imaginary part of the complex number.

◆ getReal() [1/2]

float Complex.getReal ( )

Returns the real part of the complex number. Complex#real

Returns
the real part of the complex number.

◆ getReal() [2/2]

float Complex.getReal ( )

Returns the real part of the complex number. Complex#real

Returns
the real part of the complex number.

◆ multiply() [1/3]

Complex Complex.multiply ( Complex  other)

◆ multiply() [2/3]

Complex Complex.multiply ( Complex  other)

Multiplies this complex number by another.

Parameters
otherthe complex number to multiply by.
Returns
the product of this complex number and the other.

◆ multiply() [3/3]

Complex Complex.multiply ( Complex  other)

Multiplies this complex number by another.

Parameters
otherthe complex number to multiply by.
Returns
the product of this complex number and the other.

◆ negate() [1/3]

Complex Complex.negate ( )

◆ negate() [2/3]

Complex Complex.negate ( )

Negates this complex number.

Returns
the negation of this complex number.

◆ negate() [3/3]

Complex Complex.negate ( )

Negates this complex number.

Returns
the negation of this complex number.

◆ reciprocal() [1/3]

Complex Complex.reciprocal ( )

◆ reciprocal() [2/3]

Complex Complex.reciprocal ( )

Calculates the reciprocal of this complex number.

Returns
the reciprocal of this complex number.

◆ reciprocal() [3/3]

Complex Complex.reciprocal ( )

Calculates the reciprocal of this complex number.

Returns
the reciprocal of this complex number.

◆ subtract() [1/3]

Complex Complex.subtract ( Complex  other)

◆ subtract() [2/3]

Complex Complex.subtract ( Complex  other)

Subtracts another complex number from this one.

Parameters
otherthe complex number to subtract.
Returns
the difference between this complex number and the other.

◆ subtract() [3/3]

Complex Complex.subtract ( Complex  other)

Subtracts another complex number from this one.

Parameters
otherthe complex number to subtract.
Returns
the difference between this complex number and the other.

◆ toString() [1/3]

String Complex.toString ( )

◆ toString() [2/3]

String Complex.toString ( )

Returns the string form of the complex number

Returns
String

◆ toString() [3/3]

String Complex.toString ( )

Returns the string form of the complex number

Returns
String

Member Data Documentation

◆ imaginary [1/2]

float Complex.imaginary

Imaginary part of the complex number

◆ imaginary [2/2]

float Complex.imaginary
private

Imaginary part of the complex number

◆ real [1/2]

float Complex.real

Real part of the complex number

◆ real [2/2]

float Complex.real
private

Real part of the complex number


The documentation for this class was generated from the following files: