org.jscience.mathematics.geometry
Class EmbeddedGraph

java.lang.Object
  extended by org.jscience.mathematics.geometry.EmbeddedGraph
All Implemented Interfaces:
java.lang.Cloneable

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

(�Q������) ����?��݃O���t��\���N���X?B

���̃N���X��?A�O���t�Ɋւ��� Euler �̌� (|V| - |E| + |F| = 2) ��

�������O���t��\������?B

������?AV �͒��_?AE �͕�?AF �͖ʂ�Ӗ���?A|X| �� X �̌�?���Ӗ�����?B

���̃N���X�̃C���X�^���X�� Euler �̌��ۑ����Ȃ���

�O���t��?삷�� Euler Operator ����?B

�O���t�Ɋ܂܂�钸�_?^��?^�ʂ�?A���̃N���X�̓Ք�N���X�Ƃ��ĕ\������Ă���?B

����璸�_?^��?^�ʂ�\������Ք�N���X��?A

�݂���?ڑ��֌W��ێ?����݂̂ł���?A

���_��?W�l���̊�?��͒�?ڂɂ͕ێ?���Ȃ�?B

������?A

�e���_?^��?^�ʂɂ�?A

�C�ӂ̃I�u�W�F�N�g (java.lang.Object) ��֘A�t���邱�Ƃ��ł���?B

�Ȃ�?A

���̃N���X�̃C���X�^���X��?A

�O���t��ł�?V���Ȓ��_?^��?^�ʂ�?�?���S������I�u�W�F�N�g

graphItemMaker (EmbeddedGraph.GraphItemMaker)

��ێ?����?B

�O���t��?삷�� Euler Operation ��?ۂɂ�?A

���p�҂���?ۂƂȂ钸�_?^��?^�ʂ�?�?�?�����̂ł͂Ȃ�?A

���ꂼ��� Euler Operator ����?g�̓Ք��

���� graphItemMaker �̓��Y�@�\��Ă�?o����

���_?^��?^�ʂ�?�?�����?B


Nested Class Summary
 class EmbeddedGraph.Edge
          �O���t�̔��� (�ӂ̕Њ���) ��\���Ք�N���X?
 class EmbeddedGraph.Face
          �O���t�̖ʂ�\���Ք�N���X?
protected  class EmbeddedGraph.GraphItem
          �O���t��?
static interface EmbeddedGraph.GraphItemMaker
          �O���t��ł�?
 class EmbeddedGraph.Result
          EmbeddedGraph ����� Euler Operator �̊e make �?
 class EmbeddedGraph.Vertex
          �O���t�̒��_��\���Ք�N���X?
 
Constructor Summary
EmbeddedGraph()
          ����^������?
EmbeddedGraph(EmbeddedGraph.GraphItemMaker maker)
          graphItemMaker ��^����?
 
Method Summary
protected  java.lang.Object clone()
          ���̃O���t�̕�?
 boolean contains(EmbeddedGraph.Edge edge)
          ���̃O���t��?
 boolean contains(EmbeddedGraph.Face face)
          ���̃O���t��?
 boolean contains(EmbeddedGraph.Vertex vrtx)
          ���̃O���t��?
 EmbeddedGraph copy()
          ���̃O���t�̕�?
 EmbeddedGraph copy(EmbeddedGraph seed)
          ���̃O���t�̕�?
 EmbeddedGraph dualCopy()
          ���̃O���t�̑o�Ε�?
 EmbeddedGraph dualCopy(EmbeddedGraph seed)
          ���̃O���t�̑o�Ε�?
 java.util.Enumeration edgeElements()
          ���̃O���t���܂ޕӂ� Enumeration ��Ԃ�?
 java.util.Enumeration faceElements()
          ���̃O���t���܂ޖʂ� Enumeration ��Ԃ�?
 int getNumberOfEdges()
          ���̃O���t���܂ޕӂ�?
 int getNumberOfFaces()
          ���̃O���t���܂ޖʂ�?
 int getNumberOfVertices()
          ���̃O���t���܂ޒ��_��?
 void killEdgeFace(EmbeddedGraph.Edge edge, EmbeddedGraph.Face face)
          ���̃O���t����ӂƖʂ�?
 void killEdgeVertex(EmbeddedGraph.Edge edge)
          ���̃O���t����ӂƒ��_��?
 void killVertexEdge(EmbeddedGraph.Vertex vrtx, EmbeddedGraph.Edge edge)
          ���̃O���t���璸�_�ƕӂ�?
 void killVertexFace()
          ���� (���_���‚Ɩʂ��‚����?
 EmbeddedGraph.Result makeEdgeFace(EmbeddedGraph.Face face, EmbeddedGraph.Vertex headVrtx, EmbeddedGraph.Vertex tailVrtx)
          ���̃O���t�ɕӂƖʂ�?
 EmbeddedGraph.Result makeEdgeFace(EmbeddedGraph.Face face, EmbeddedGraph.Vertex headVrtx, EmbeddedGraph.Vertex tailVrtx, EmbeddedGraph.Edge headEdge, EmbeddedGraph.Edge tailEdge)
          ���̃O���t�ɕӂƖʂ�?
 EmbeddedGraph.Result makeEdgeVertex(EmbeddedGraph.Face face, EmbeddedGraph.Vertex vrtx)
          ���̃O���t�ɕӂƒ��_��?
 EmbeddedGraph.Result makeVertexEdge(EmbeddedGraph.Edge edge)
          ���̃O���t�ɒ��_�ƕӂ�?
 EmbeddedGraph.Result makeVertexFace()
          ���� (���) �O���t�ɒ��_�Ɩʂ�?
protected  void setGraphItemMaker(EmbeddedGraph.GraphItemMaker maker)
          �^����ꂽ�I�u�W�F�N�g��?
 java.util.Enumeration vertexElements()
          ���̃O���t���܂ޒ��_�� Enumeration ��Ԃ�?
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedGraph

public EmbeddedGraph()
����^������?A��̖���?��݃O���t�Ƃ��ăI�u�W�F�N�g��?\�z����?B

���̃R���X�g���N�^�ł�?A

?\�z����C���X�^���X�� graphItemMaker �Ƃ���?A�P��

EmbeddedGraph.Vertex

/

EmbeddedGraph.Face

/

EmbeddedGraph.Edge

�̃C���X�^���X��?�?�����I�u�W�F�N�g��?ݒ肷��?B


EmbeddedGraph

public EmbeddedGraph(EmbeddedGraph.GraphItemMaker maker)
graphItemMaker ��^����?A��̖���?��݃O���t�Ƃ��ăI�u�W�F�N�g��?\�z����?B

Parameters:
maker - ?V���Ȓ��_?^��?^�ʂ�?�?���S������I�u�W�F�N�g
Method Detail

setGraphItemMaker

protected void setGraphItemMaker(EmbeddedGraph.GraphItemMaker maker)
�^����ꂽ�I�u�W�F�N�g��?A

���̃O���t��?V���Ȓ��_?^��?^�ʂ�?�?���S������I�u�W�F�N�g�Ƃ���

?ݒ肷��?B

Parameters:
?V���Ȓ��_?^��?^�ʂ�?�?���S������I�u�W�F�N�g -

getNumberOfVertices

public int getNumberOfVertices()
���̃O���t���܂ޒ��_��?���Ԃ�?B

Returns:
���_��?�

getNumberOfEdges

public int getNumberOfEdges()
���̃O���t���܂ޕӂ�?���Ԃ�?B

Returns:
�ӂ�?�

getNumberOfFaces

public int getNumberOfFaces()
���̃O���t���܂ޖʂ�?���Ԃ�?B

Returns:
�ʂ�?�

vertexElements

public java.util.Enumeration vertexElements()
���̃O���t���܂ޒ��_�� Enumeration ��Ԃ�?B

Returns:
���_�� Enumeration

edgeElements

public java.util.Enumeration edgeElements()
���̃O���t���܂ޕӂ� Enumeration ��Ԃ�?B

Returns:
�ӂ� Enumeration

faceElements

public java.util.Enumeration faceElements()
���̃O���t���܂ޖʂ� Enumeration ��Ԃ�?B

Returns:
�ʂ� Enumeration

contains

public boolean contains(EmbeddedGraph.Vertex vrtx)
���̃O���t��?A�^����ꂽ���_��܂ނ��ۂ���Ԃ�?B

Parameters:
vrtx - ��?����钸�_
vrtx - ���O���t�Ɋ܂܂�Ă���� true?A�����łȂ���� false

contains

public boolean contains(EmbeddedGraph.Face face)
���̃O���t��?A�^����ꂽ�ʂ�܂ނ��ۂ���Ԃ�?B

Parameters:
face - ��?������
face - ���O���t�Ɋ܂܂�Ă���� true?A�����łȂ���� false

contains

public boolean contains(EmbeddedGraph.Edge edge)
���̃O���t��?A�^����ꂽ�ӂ�܂ނ��ۂ���Ԃ�?B

Parameters:
edge - ��?������
edge - ���O���t�Ɋ܂܂�Ă���� true?A�����łȂ���� false

makeVertexFace

public EmbeddedGraph.Result makeVertexFace()
���� (���) �O���t�ɒ��_�Ɩʂ�?�?�����?B

���̃O���t����łȂ�?�?��ɂ�?A

FatalException �̗�O��?�����?B

Returns:
?V����?�?����ꂽ���_�Ɩ�
See Also:
FatalException, killVertexFace()

killVertexFace

public void killVertexFace()
���� (���_���‚Ɩʂ��‚����?��) �O���t����?A���̒��_�Ɩʂ�?�?�����?B

���̃O���t�����_���‚Ɩʂ��‚����?�‚�̂łȂ�?�?��ɂ�?A

FatalException �̗�O��?�����?B

See Also:
FatalException, makeVertexFace()

makeEdgeVertex

public EmbeddedGraph.Result makeEdgeVertex(EmbeddedGraph.Face face,
                                           EmbeddedGraph.Vertex vrtx)
���̃O���t�ɕӂƒ��_��?�?�����?B

���_����?V���ȕӂ�?L�΂�?B

face ���邢�� vrtx ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

vrtx �� face �̒��_�T�C�N���Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

Parameters:
face - ���̓Ք��?V���ȕӂ�?L�΂���
vrtx - ?V���ȕӂ̎n�_�ƂȂ钸�_
Returns:
?V����?�?����ꂽ�ӂƒ��_
See Also:
InvalidArgumentValueException, killEdgeVertex(EmbeddedGraph.Edge)

killEdgeVertex

public void killEdgeVertex(EmbeddedGraph.Edge edge)
���̃O���t����ӂƒ��_��?�?�����?B

�Ԃ牺���B��ӂ�?�?�����?B

edge ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

edge ���Ԃ牺���B��ӂłȂ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

�Ȃ�?A�����‚��̕ӂ��q���BĂԂ牺���BĂ���悤��?󋵂ɂ����Ă�?A

����?�?�[�ȊO�̕ӂ�?u�Ԃ牺���BĂ���?v�Ƃ݂͂Ȃ��Ȃ�?B

Parameters:
edge - ?�?������
See Also:
InvalidArgumentValueException, makeEdgeVertex(EmbeddedGraph.Face,EmbeddedGraph.Vertex)

makeVertexEdge

public EmbeddedGraph.Result makeVertexEdge(EmbeddedGraph.Edge edge)
���̃O���t�ɒ��_�ƕӂ�?�?�����?B

�ӂ��‚ɕ�������?B

edge ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

Parameters:
edge - ���������
Returns:
?V����?�?����ꂽ���_�ƕ�
See Also:
InvalidArgumentValueException, killVertexEdge(EmbeddedGraph.Vertex,EmbeddedGraph.Edge)

killVertexEdge

public void killVertexEdge(EmbeddedGraph.Vertex vrtx,
                           EmbeddedGraph.Edge edge)
���̃O���t���璸�_�ƕӂ�?�?�����?B

��‚̕ӂ싂Ԓ��_��?�?�����?B

vrtx ���邢�� edge ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

edge �� vrtx �Ɍq���BĂ��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

vrtx �Ɍq���BĂ���ӂ�?��� 2 �ȊO��?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

Parameters:
vrtx - ?�?����钸�_
edge - ?�?������
See Also:
InvalidArgumentValueException, makeVertexEdge(EmbeddedGraph.Edge)

makeEdgeFace

public EmbeddedGraph.Result makeEdgeFace(EmbeddedGraph.Face face,
                                         EmbeddedGraph.Vertex headVrtx,
                                         EmbeddedGraph.Vertex tailVrtx)
���̃O���t�ɕӂƖʂ�?�?�����?B

�ʂ��‚ɕ�������?B

�w�肵�� face ��?��?V����?�?������ӂ�?��ʂƂ��Ďc��?B

���̃?�\�b�h��?A���̓Ք�ɂԂ牺���B��ӂ�?���Ȃ��ʂ𕪊�����?�?���z�肵�Ă���?B

�Ԃ牺���B��ӂ�?���Ȃ��ʂ�?A���̂Ԃ牺���B��ӂ�?��{�̒��_�ŕ�������?�?��ɂ�?A

makeEdgeFace(Face, Vertex, Vertex, Edge, Edge)

�𗘗p���Ȃ���΂Ȃ�Ȃ�?B

face ���邢�� headVrtx, tailVrtx ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

headVrtx, tailVrtx �� face �̒��_�T�C�N���Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

headVrtx �� tailVrtx ������̒��_�ł���?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

Parameters:
face - ���������
headVrtx - ?V����?�?������ӂ̎n�_�ƂȂ钸�_
tailVrtx - ?V����?�?������ӂ�?I�_�ƂȂ钸�_
Returns:
?V����?�?����ꂽ�ӂƖ�
See Also:
InvalidArgumentValueException, killEdgeFace(EmbeddedGraph.Edge,EmbeddedGraph.Face)

makeEdgeFace

public EmbeddedGraph.Result makeEdgeFace(EmbeddedGraph.Face face,
                                         EmbeddedGraph.Vertex headVrtx,
                                         EmbeddedGraph.Vertex tailVrtx,
                                         EmbeddedGraph.Edge headEdge,
                                         EmbeddedGraph.Edge tailEdge)
���̃O���t�ɕӂƖʂ�?�?�����?B

�ʂ��‚ɕ�������?B

�w�肵�� face ��?��?V����?�?������ӂ�?��ʂƂ��Ďc��?B

���̃?�\�b�h��?A���̓Ք�ɂԂ牺���B��ӂ�?�‚悤�Ȗʂ�

���̂Ԃ牺���B��ӂ�?��{�̒��_�ŕ�������悤��?�?���z�肵�Ă���?B

�Ԃ牺���B��ӂ�?���Ȃ��ʂ𕪊�����?�?��ɂ�?A

�킴�킴�ӂ�w�肷��K�v�̖����?�\�b�h

makeEdgeFace(Face, Vertex, Vertex)

�𗘗p�����ȒP�ł���?B

�^����ꂽ��?^���_?^�ӂ̂����ꂩ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

headVrtx, tailVrtx �� face �̒��_�T�C�N���Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

headVrtx �� tailVrtx ������̒��_�ł���?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

headVrtx �� headEdge �̒[�_�łȂ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

tailVrtx �� tailEdge �̒[�_�łȂ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

Parameters:
face - ���������
headVrtx - ?V����?�?������ӂ̎n�_�ƂȂ钸�_
tailVrtx - ?V����?�?������ӂ�?I�_�ƂȂ钸�_
headEdge - ?V����?�?������ӂ̉E�ʂ̎��ɂȂ��
tailEdge - ?V����?�?������ӂ�?��ʂ̎��ɂȂ��
Returns:
?V����?�?����ꂽ�ӂƖ�
See Also:
InvalidArgumentValueException, killEdgeFace(EmbeddedGraph.Edge,EmbeddedGraph.Face)

killEdgeFace

public void killEdgeFace(EmbeddedGraph.Edge edge,
                         EmbeddedGraph.Face face)
���̃O���t����ӂƖʂ�?�?�����?B

��‚̖ʂ𕪂��Ă���ӂ�?�?�����?B

edge ���邢�� face ��?A���̃O���t�Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

edge �� face �̕ӃT�C�N���Ɋ܂܂�Ă��Ȃ�?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

edge ���Ԃ牺���B��ӂł���?�?��ɂ�

InvalidArgumentValueException �̗�O��?�����?B

�Ȃ�?A�����‚��̕ӂ��q���BĂԂ牺���BĂ���悤��?󋵂ɂ����Ă�?A

���̂��ׂĂ̕ӂ�?u�Ԃ牺���BĂ���?v�Ƃ݂Ȃ�?B

Parameters:
edge - ?�?������
face - ?�?������
See Also:
InvalidArgumentValueException, makeEdgeFace(EmbeddedGraph.Face,EmbeddedGraph.Vertex,EmbeddedGraph.Vertex), makeEdgeFace(EmbeddedGraph.Face,EmbeddedGraph.Vertex,EmbeddedGraph.Vertex,EmbeddedGraph.Edge,EmbeddedGraph.Edge)

clone

protected java.lang.Object clone()
���̃O���t�̕�?���Ԃ�?B

Overrides:
clone in class java.lang.Object
Returns:
��?����ꂽ�O���t
See Also:
copy(), copy(EmbeddedGraph)

copy

public EmbeddedGraph copy()
���̃O���t�̕�?���Ԃ�?B

���̃?�\�b�h��?��?�͈ȉ��̒ʂ�?B

 

return copy(new EmbeddedGraph());

Returns:
��?����ꂽ�O���t
See Also:
clone(), copy(EmbeddedGraph), EmbeddedGraph()

copy

public EmbeddedGraph copy(EmbeddedGraph seed)
���̃O���t�̕�?���Ԃ�?B

seed �ɂ�?A?\�z�����΂���̋�̃O���t��^����?B

Parameters:
seed - ��?����ꂽ�ʑ�?���ێ?���邽�߂̃O���t
Returns:
��?����ꂽ�O���t
See Also:
clone(), copy()

dualCopy

public EmbeddedGraph dualCopy()
���̃O���t�̑o�Ε�?���Ԃ�?B

���̃?�\�b�h��?��?�͈ȉ��̒ʂ�?B

 

return dualCopy(new EmbeddedGraph());

Returns:
�o�Ε�?����ꂽ�O���t
See Also:
dualCopy(EmbeddedGraph), EmbeddedGraph()

dualCopy

public EmbeddedGraph dualCopy(EmbeddedGraph seed)
���̃O���t�̑o�Ε�?���Ԃ�?B

seed �ɂ�?A?\�z�����΂���̋�̃O���t��^����?B

Parameters:
seed - �o�Ε�?����ꂽ�ʑ�?���ێ?���邽�߂̃O���t
Returns:
�o�Ε�?����ꂽ�O���t
See Also:
dualCopy()