jp.go.ipa.jgcl
クラス JgclComplex

java.lang.Object
  |
  +--jp.go.ipa.jgcl.JgclComplex
すべての実装インタフェース:
java.lang.Cloneable

public class JgclComplex
extends java.lang.Object
implements java.lang.Cloneable

複素数を表すクラス。

このクラスのインスタンスは、 複素数の実数部を表す実数 re と虚数部を表す実数 im を持つ。

バージョン:
$Revision: 1.9 $, $Date: 2000/04/26 09:38:48 $
作成者:
Information-technology Promotion Agency, Japan

コンストラクタの概要
JgclComplex()
          実数部 0.0、虚数部 0.0 のオブジェクトを構築する。
JgclComplex(double r)
          与えられた実数部を持ち、虚数部 0.0 のオブジェクトを構築する。
JgclComplex(double r, double i)
          与えられた実数部と虚数部でオブジェクトを構築する。
 
メソッドの概要
 double abs()
          this の絶対値を返す。
 JgclComplex add(JgclComplex mate)
          (this + mate) を返す。
 double arg()
          this の偏角を返す。
 JgclComplex conj()
          this の共役値を返す。
 JgclComplex copy()
          この複素数の複製を返す。
 JgclComplex div(double mate)
          (this / mate) を返す。
 JgclComplex div(JgclComplex mate)
          (this / mate) を返す。
 JgclComplex exp()
          this の exponential を返す。
 JgclComplex getEpsilon()
          この複素数の符号に対応した「複素数の丸め誤差」を返す。
 double imag()
          この複素数の虚数部の値を返す。
 JgclComplex minus()
          (- this) を返す。
 JgclComplex mul(double mate)
          (this * mate) を返す。
 JgclComplex mul(JgclComplex mate)
          (this * mate) を返す。
 double real()
          この複素数の実数部の値を返す。
 JgclComplex sqrt()
          this の平方根を返す。
 JgclComplex sub(JgclComplex mate)
          (this - mate) を返す。
 java.lang.String toString()
          この複素数の属性を表す String を返す。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

JgclComplex

public JgclComplex()
実数部 0.0、虚数部 0.0 のオブジェクトを構築する。

JgclComplex

public JgclComplex(double r,
                   double i)
与えられた実数部と虚数部でオブジェクトを構築する。
パラメータ:
r - 実数部
i - 虚数部

JgclComplex

public JgclComplex(double r)
与えられた実数部を持ち、虚数部 0.0 のオブジェクトを構築する。
パラメータ:
r - 実数部
メソッドの詳細

real

public double real()
この複素数の実数部の値を返す。
戻り値:
実数部の値

imag

public double imag()
この複素数の虚数部の値を返す。
戻り値:
虚数部の値

copy

public JgclComplex copy()
この複素数の複製を返す。
戻り値:
新たに生成された複製

minus

public JgclComplex minus()
(- this) を返す。
戻り値:
(- this)

add

public JgclComplex add(JgclComplex mate)
(this + mate) を返す。
戻り値:
(this + mate)

sub

public JgclComplex sub(JgclComplex mate)
(this - mate) を返す。
戻り値:
(this - mate)

mul

public JgclComplex mul(JgclComplex mate)
(this * mate) を返す。
戻り値:
(this * mate)

mul

public JgclComplex mul(double mate)
(this * mate) を返す。
戻り値:
(this * mate)

div

public JgclComplex div(JgclComplex mate)
(this / mate) を返す。
戻り値:
(this / mate)

div

public JgclComplex div(double mate)
(this / mate) を返す。
戻り値:
(this / mate)

abs

public double abs()
this の絶対値を返す。
戻り値:
this の絶対値

arg

public double arg()
this の偏角を返す。
戻り値:
this の偏角

conj

public JgclComplex conj()
this の共役値を返す。
戻り値:
this の共役値

exp

public JgclComplex exp()
this の exponential を返す。
戻り値:
this の exponential

sqrt

public JgclComplex sqrt()
this の平方根を返す。
戻り値:
this の平方根

toString

public java.lang.String toString()
この複素数の属性を表す String を返す。
オーバーライド:
クラス java.lang.Object 内の toString
戻り値:
この複素数の属性を表す文字列

getEpsilon

public final JgclComplex getEpsilon()
この複素数の符号に対応した「複素数の丸め誤差」を返す。
戻り値:
この複素数の符号に対応した「複素数の丸め誤差」