net.von_gagern.martin.confoo.mesh
Class TriangleInequalityException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.von_gagern.martin.confoo.mesh.MeshException
              extended by net.von_gagern.martin.confoo.mesh.TriangleInequalityException
All Implemented Interfaces:
Serializable, CorneredTriangle<Object>

public class TriangleInequalityException
extends MeshException
implements CorneredTriangle<Object>

Violation of triangle inequality.

The triangle inequality states that for any three edges a, b and c of a triangle, a <= b + c always holds.

Applications relying on the triangle inequality in a MetricMesh should throw this exception if the triangle inequality was violated. Algorithms transforming a mesh may throw it as well if the resulting mesh would violate the triangle inequality.

Since:
1.0
Author:
Martin von Gagern
See Also:
Serialized Form

Constructor Summary
TriangleInequalityException(Object rep1, Object rep2, Object rep3)
           
 
Method Summary
 Object getCorner(int i)
          Get specified corner.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriangleInequalityException

public TriangleInequalityException(Object rep1,
                                   Object rep2,
                                   Object rep3)
Method Detail

getCorner

public Object getCorner(int i)
Description copied from interface: CorneredTriangle
Get specified corner.

Specified by:
getCorner in interface CorneredTriangle<Object>
Parameters:
i - the index of the corner requested
Returns:
an object identifying the requested corner


Copyright © 2008-2009 Martin von Gagern. All Rights Reserved.