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

- - ### 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

    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.

  - ### Method Detail

    - #### setGeometry

          public void setGeometry(PgElementSet geom)

      Store the geometry as PgElementSet to this workshop.

    - #### 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`

    - #### 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.

    - #### 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.

    - #### 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.

    - #### 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.

    - #### match

          public void match()

      Invoke a matching of triangles and turn triangles according to the matching.

    - #### 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.

    - #### 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.

    - #### 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.

"

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