org.jscience.mathematics.geometry
Class GeometryUtils

java.lang.Object
  extended by org.jscience.mathematics.geometry.GeometryUtils

public class GeometryUtils
extends java.lang.Object

?�?��w�I�ȉ��Z��?s���e��� static �?�\�b�h��?�ƒN���X?B


Method Summary
protected static int bsearchDoubleArray(double[] array, int min, int max, double value)
          ?
static double copySign(double a, double b)
          �����?
static double getDefiniteIntegral(PrimitiveMapping func, ParameterSection parameterSection, double tolerance)
          ���?
static boolean isDividable(double a, double b)
          �^����ꂽ��‚̎�?
static boolean isReciprocatable(double value)
          �^����ꂽ��?
static void main(java.lang.String[] argv)
          �f�o�b�O�p�?
static double normalizeAngle(double angle)
          �^����ꂽ�p�x�� [0, 2 * PI] �̊Ԃ̒l��?
static double[] solveSimultaneousEquations(PrimitiveMappingND func, PrimitiveMappingND[] derivatives, PrimitiveBooleanMappingNDTo1D convergence, double[] initialGuesses)
          ��?
static double[] solveSimultaneousEquationsWithCorrection(PrimitiveMappingND func, PrimitiveMappingND[] derivatives, PrimitiveBooleanMappingNDTo1D convergence, PrimitiveMappingND correct, double[] initialGuesses)
          ��?
protected static void sortDoubleArray(double[] array)
           
protected static void sortDoubleArray(double[] array, int low, int up)
           
 double toDecimalAngle(int d, int m, double s)
          Calculate the angle in decimal notation with the three values.
static double toDegrees(double radians)
          Method to convert radians to degrees
 double[] toDegreesMinutesSeconds(double dd)
          Calculate the arcminute and arcsecond to a given angle.
static double toRadians(double degrees)
          Method to convert degrees to radians
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefiniteIntegral

public static double getDefiniteIntegral(PrimitiveMapping func,
                                         ParameterSection parameterSection,
                                         double tolerance)
���?��̎�?���?��̒�?ϕ���?�߂�?B

�^����ꂽ��?ϕ���?� func ��?ϕ���� parameterSection �ɑ΂����?ϕ��l��Ԃ�?B

���e��?��l tolerance �ɑ΂�?A ��?d�w?���?��^?��l?ϕ���ɂ��?A ���̋��e��?���̌�?�����?ϕ��̋ߎ��l��Ԃ�?B

parameterSection �̑?���l�͕��ł�?\��Ȃ���?A parameterSection �̕\����Ԃ� func �̒�`���Ɏ�܂BĂ���K�v������?B

tolerance ��?A����?�Βl�𗘗p����?B

Parameters:
func - ���?��̎�?���?�
parameterSection - ��?ϕ��͈̔�
tolerance - ?ϕ����ʂɑ΂���?�Ό�?��̋��e�l
Returns:
��?ϕ��l

copySign

public static double copySign(double a,
                              double b)
�����?��l��?����̕�?��𑼂̎�?��l�̂����?��킹��?B

a ��?����̕�?��� b �̂����?��킹���l��Ԃ�?B

Parameters:
a - ��?�
b - ��?�
Returns:
b �̕�?���?��킹�� a

solveSimultaneousEquations

public static double[] solveSimultaneousEquations(PrimitiveMappingND func,
                                                  PrimitiveMappingND[] derivatives,
                                                  PrimitiveBooleanMappingNDTo1D convergence,
                                                  double[] initialGuesses)
��?�`�̘A������j��?[�g���@�ɂ����Z�ʼn�?B

n �‚̖��m?� (x0, ..., xm), (m = n - 1) �ɑ΂��� ��?�`�̘A����� Fi(x0, ..., xm) = 0, (i = 0, ..., m) ���?B

func �� Fi(x0, ..., xm), (i = 0, ..., m) �̒l��Ԃ� n ��?� (x0, ..., xm) �̊�?���?A n �‚̒l (F0, ..., Fm) ��Ԃ�?B

derivatives[i] �� Fi(x0, ..., xm) �̕Δ� dFi/dxj, (j = 0, ..., m) ��Ԃ� n ��?� (x0, ..., xm) �̊�?���?A n �‚̒l (dFi/dx0, ..., dFi/dxm) ��Ԃ�?B

convergence ��?An �‚̉⪎��ł��邩�ۂ��𔻒f���� n ��?� (x0, ..., xm) �̊�?���?A n �‚̉� (x0, ..., xm) �ŘA���������Ă���� true?A �����łȂ���� false ��Ԃ�?B

Parameters:
func - n �‚̖��m?� x ��܂ޘA����� Fi(x) = 0 ��?��Ӓl (F0, ..., Fm) ��Ԃ���?�
derivatives - Fi �̕Δ�l (dFi/dx0, ..., dFi/dxm) ��Ԃ���?��̔z��
convergence - n �‚̉� (x0, ..., xm) �����ł��邩�ۂ��𔻒f�����?�
initialGuesses - n �‚̉� (x0, ..., xm) ��?���l�̔z��
Returns:
�A�����̎�� (x0, ..., xm) �̔z��
See Also:
solveSimultaneousEquationsWithCorrection(PrimitiveMappingND,PrimitiveMappingND[],PrimitiveBooleanMappingNDTo1D,PrimitiveMappingND,double[])

solveSimultaneousEquationsWithCorrection

public static double[] solveSimultaneousEquationsWithCorrection(PrimitiveMappingND func,
                                                                PrimitiveMappingND[] derivatives,
                                                                PrimitiveBooleanMappingNDTo1D convergence,
                                                                PrimitiveMappingND correct,
                                                                double[] initialGuesses)
��?�`�̘A������j��?[�g���@�ɂ����Z�ʼn� (���Z�r���ł̉�̕�?��@�\�t��) ?B

n �‚̖��m?� (x0, ..., xm), (m = n - 1) �ɑ΂��� ��?�`�̘A����� Fi(x0, ..., xm) = 0, (i = 0, ..., m) ���?B

func �� Fi(x0, ..., xm), (i = 0, ..., m) �̒l��Ԃ� n ��?� (x0, ..., xm) �̊�?���?A n �‚̒l (F0, ..., Fm) ��Ԃ�?B

derivatives[i] �� Fi(x0, ..., xm) �̕Δ� dFi/dxj, (j = 0, ..., m) ��Ԃ� n ��?� (x0, ..., xm) �̊�?���?A n �‚̒l (dFi/dx0, ..., dFi/dxm) ��Ԃ�?B

convergence ��?An �‚̉⪎��ł��邩�ۂ��𔻒f���� n ��?� (x0, ..., xm) �̊�?���?A n �‚̉� (x0, ..., xm) �ŘA���������Ă���� true?A �����łȂ���� false ��Ԃ�?B

correct ��?A���Z�̓r���� n �‚̉� (x0, ..., xm) �̒l��?��I��?C?������?���?A ?C?���� n �‚̉� (x0, ..., xm) ��Ԃ�?B correct ��?A���Z�̃�?[�v�ɂ����� convergence �̌Ă�?o���̑O�ɌĂ�?o�����?B

Parameters:
func - n �‚̖��m?� x ��܂ޘA����� Fi(x) = 0 ��?��Ӓl (F0, ..., Fm) ��Ԃ���?�
derivatives - Fi �̕Δ�l (dFi/dx0, ..., dFi/dxm) ��Ԃ���?��̔z��
convergence - n �‚̉� (x0, ..., xm) �����ł��邩�ۂ��𔻒f�����?�
correct - ���Z�̓r���� n �‚̉� (x0, ..., xm) �̒l��?��I��?C?������?�
initialGuesses - n �‚̉� (x0, ..., xm) ��?���l�̔z��
Returns:
�A�����̎�� (x0, ..., xm) �̔z��
See Also:
solveSimultaneousEquations(PrimitiveMappingND,PrimitiveMappingND[],PrimitiveBooleanMappingNDTo1D,double[])

normalizeAngle

public static double normalizeAngle(double angle)
�^����ꂽ�p�x�� [0, 2 * PI] �̊Ԃ̒l��?��K������?B

Parameters:
angle - �p�x (���W�A��)
Returns:
?��K�����ꂽ�p�x (���W�A��)

main

public static void main(java.lang.String[] argv)
�f�o�b�O�p�?�C���v�?�O����?B


sortDoubleArray

protected static void sortDoubleArray(double[] array)

sortDoubleArray

protected static void sortDoubleArray(double[] array,
                                      int low,
                                      int up)

bsearchDoubleArray

protected static int bsearchDoubleArray(double[] array,
                                        int min,
                                        int max,
                                        double value)
?�?��Ƀ\?[�g���ꂽ double �̂P�����z��ɂ�����?A �^����ꂽ�l��z���Ȃ����?ő�l��?�—v�f�̃C���f�b�N�X

(array[v] <= value && value < array[v + 1]) �𖞂��l v ��Ԃ�?B

value < array[min] �Ȃ�� (min - 1) ��Ԃ�?B

array[max] <= value �Ȃ�� max ��Ԃ�?B

Parameters:
array - double �̂P�����z��
min - �\?[�g�̑�?۔͈͂̊J�n�C���f�b�N�X
max - �\?[�g�̑�?۔͈͂�?I���C���f�b�N�X
value - ?��?��?ۂƂ���l
Returns:
value ��z���Ȃ����?ő�l��?�—v�f�̃C���f�b�N�X

toDegreesMinutesSeconds

public double[] toDegreesMinutesSeconds(double dd)
Calculate the arcminute and arcsecond to a given angle.

Parameters:
dd - the angle in degree in decimal notation.

toDecimalAngle

public double toDecimalAngle(int d,
                             int m,
                             double s)
Calculate the angle in decimal notation with the three values.

Parameters:
d - the angle in degree [�].
m - the arcminute ['].
s - the arcsecond [''].

toDegrees

public static double toDegrees(double radians)
Method to convert radians to degrees

Parameters:
radians - - the value
Returns:
the equivalent in degrees

toRadians

public static double toRadians(double degrees)
Method to convert degrees to radians

Parameters:
degrees - - the value
Returns:
the equivalent in radians

isReciprocatable

public static boolean isReciprocatable(double value)
�^����ꂽ��?��̋t?����Ƃ�邩�ǂ�����?�����?B

Parameters:
value - �t?����Ƃ�邩�ǂ�����?�����l
Returns:
�t?����Ƃ��̂ł���� true?A�����łȂ���� false
See Also:
MachineEpsilon.DOUBLE

isDividable

public static boolean isDividable(double a,
                                  double b)
�^����ꂽ��‚̎�?���?��Z���S���ǂ�����?�����?B

(a / b) ���S���ǂ����𒲂ׂ�?B

Parameters:
a - ��?�?�
b - ?�?�
Returns:
�S�Ɋ����̂ł���� true?A�����łȂ���� false
See Also:
isReciprocatable(double)