jvx.geom

## Class PwMatching

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.geom.PwMatching

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf

      public class PwMatching
      extends PjWorkshop

  Class to match the triangles of a PgElementSet to pairs of neighboured triangles. Matched triangles are each other's 0-th neighbour triangle.
  See Also:
    Serialized Form
  Author:
    Ulrich Reitebuch
  Version:
    29.10.03, 1.00 created (ur)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CONSERVATIVE` One of the pre-matching types.
    `static int` | `DIJKSTRA` One of the pre-matching types.
    `static int` | `GREEDY` One of the pre-matching types.
    `static int` | `NONE` One of the pre-matching types.

    - ### Fields inherited from class jv.object.PsObject

      `HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS`

    - ### Fields inherited from interface jv.project.PjWorkshopIf

      `MODE_BUG, MODE_STANDARD, MODE_VALIDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PwMatching()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `conservativeMatching()` Store matchings of triangles, that are encoded in the 0-th neighbours allready; unmatched triangles are tried to match by greedy matching afterwards, so that every unmatched triangle will have matched neighbour triangles only.
    `void` | `dijkstraMatching()` Generate dijkstra distances for the vertices and match triangles, that share a common edge of the dijkstra level lines; somewhere triangles might have more possible matching partners, these will matched to one of them.
    `void` | `greedyMatching()` For all unmatched triangles try to find an unmatched neighbour triangle and match those.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `void` | `makeQuadrangulation()` Find in a triangulation pairs of matched triangles, indicated by beeing each other's 0-th neighbour, and jaoin those to quadrangles.
    `void` | `match()` Invoke a matching of triangles and turn triangles according to the matching.
    `void` | `matchAllInner()` Invoke a Matching of all inner triangles.
    `void` | `reset()` Reset the workshop to its initial status.
    `void` | `scrambleTriangles()` Change the internal order of indices of the vertices in all triangles by random to get arbitrary examples for testing the algorithm.
    `void` | `setGeometry(PgElementSet geom)` Store the geometry as PgElementSet to this workshop.
    `void` | `setPreMatching(int type)` Define the type of pre-matching.
    `void` | `turnTriangles()` Change the internal order of indices of the vertices of all triangles such, that the 0-th neighbour is the matching partner according to the internal data structure of this class.

    - ### Methods inherited from class jvx.project.PjWorkshop

      `cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer, update`

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getFather, getName, setParent`

- - ### Field Detail

    - #### CONSERVATIVE

          public static final int CONSERVATIVE

      One of the pre-matching types.
      See Also:
        Constant Field Values

    - #### DIJKSTRA

          public static final int DIJKSTRA

      One of the pre-matching types.
      See Also:
        Constant Field Values

    - #### GREEDY

          public static final int GREEDY

      One of the pre-matching types.
      See Also:
        Constant Field Values

    - #### NONE

          public static final int NONE

      One of the pre-matching types.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PwMatching

          public PwMatching()

      Constructor.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

  - ### Method Detail

    - #### setGeometry

          public void setGeometry(PgElementSet geom)

      Store the geometry as PgElementSet to this workshop.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### setPreMatching

          public void setPreMatching(int type)

      Define the type of pre-matching.

    - #### init

          public void init()

      Description copied from class: `PjWorkshop`
      Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
      Overrides:
        `init` in class `PjWorkshop`

    - #### reset

          public void reset()

      Reset the workshop to its initial status.
      Overrides:
        `reset` in class `PjWorkshop`
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### dijkstraMatching

          public void dijkstraMatching()

      Generate dijkstra distances for the vertices and match triangles, that share a common edge of the dijkstra level lines; somewhere triangles might have more possible matching partners, these will matched to one of them. Unmatched triangles are tried to match by greedy matching afterwards, so that every unmatched triangle will have matched neighbour triangles only. The matching is only stored to the internal data structure.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### conservativeMatching

          public void conservativeMatching()

      Store matchings of triangles, that are encoded in the 0-th neighbours allready; unmatched triangles are tried to match by greedy matching afterwards, so that every unmatched triangle will have matched neighbour triangles only. The matching is only stored to the internal data structure.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### greedyMatching

          public void greedyMatching()

      For all unmatched triangles try to find an unmatched neighbour triangle and match those. The matching is only stored to the internal data structure.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### turnTriangles

          public void turnTriangles()

      Change the internal order of indices of the vertices of all triangles such, that the 0-th neighbour is the matching partner according to the internal data structure of this class.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### match

          public void match()

      Invoke a matching of triangles and turn triangles according to the matching.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### matchAllInner

          public void matchAllInner()

      Invoke a Matching of all inner triangles. Boundaries of the elemtSet are closed by additional triangles, so the new elementSet has a perfect matching. After removing the new triangles again, there may be unmatched triangles at the boundary.
      Author:
        Ulrich Reitebuch
      Version:
        29.10.03, 1.00 created (ur)

    - #### makeQuadrangulation

          public void makeQuadrangulation()

      Find in a triangulation pairs of matched triangles, indicated by beeing each other's 0-th neighbour, and jaoin those to quadrangles.
      Author:
        Ulrich Reitebuch
      Version:
        05.11.03, 1.00 created. (ur)

    - #### scrambleTriangles

          public void scrambleTriangles()

      Change the internal order of indices of the vertices in all triangles by random to get arbitrary examples for testing the algorithm.
      Author:
        Ulrich Reitebuch
      Version:
        07.11.03, 1.00 created (ur)

"

The software JavaView? is copyright protected. All Rights Reserved.
"