Class FuzzyBoundary2D
java.lang.Object
org.episteme.core.mathematics.geometry.boundaries.FuzzyBoundary2D
- All Implemented Interfaces:
Serializable, Boundary<Point2D>, Boundary2D
A 2D boundary with fuzzy (graded) membership.
Unlike crisp boundaries where a point is either IN (1.0) or OUT (0.0), fuzzy boundaries return a membership degree in the range [0, 1].
This is useful for:
- Uncertainty in boundary definition
- Transition zones (e.g., ecological gradients)
- Influence zones (diminishing influence with distance)
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFuzzyBoundary2D(Boundary2D core, Boundary2D support) Creates a fuzzy boundary from core and support boundaries.FuzzyBoundary2D(Boundary2D core, Boundary2D support, Function<Real, Real> membershipFunction) Creates a fuzzy boundary with custom membership function. -
Method Summary
Modifier and TypeMethodDescriptionReturns a crisp boundary for a given alpha level.booleanChecks if a point is contained within this boundary.Computes the convex hull of this boundary.Creates an extruded 3D boundary from this 2D boundary.fuzzyAnd(Point2D point, FuzzyBoundary2D other) Fuzzy AND (intersection) - minimum membership.Fuzzy NOT - complement membership.fuzzyOr(Point2D point, FuzzyBoundary2D other) Fuzzy OR (union) - maximum membership.static RealgaussianMembership(Real ratio) Gaussian membership function.getArea()Returns the area of this 2D boundary.Returns the bounding box of this boundary.Returns the centroid of this boundary.getCore()Returns the core boundary.getMembership(Point2D point) Returns the membership degree for a point.Returns the perimeter of this 2D boundary.Returns the support boundary.getVertex(int index) Returns a specific vertex.intReturns the number of vertices.Returns the vertices of this boundary in order.intersection(Boundary<Point2D> other) Computes the intersection of this boundary with another.booleanintersects(Boundary<Point2D> other) Checks if this boundary intersects with another.booleanisConvex()Checks if this boundary is convex.booleanisEmpty()Checks if this boundary is empty.static ReallinearMembership(Real ratio) Linear membership function: f(r) = rRotates the boundary around the centroid.rotateAround(Real angleRadians, Point2D pivot) Rotates around a specific pivot point.Creates a scaled copy of this boundary.static RealsigmoidMembership(Real ratio) Sigmoid membership function for smooth transition.toString()Creates a copy of this boundary translated by a vector.Computes the union of this boundary with another.static FuzzyBoundary2DwithBuffer(Boundary2D crisp, Real bufferWidth) Creates a fuzzy boundary with a buffer zone around a crisp boundary.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Boundary2D
getBoundaryMeasure, getDimension, getMeasure
-
Constructor Details
-
FuzzyBoundary2D
Creates a fuzzy boundary from core and support boundaries. Points in core have membership 1.0, points outside support have 0.0, and points between have graded membership.- Parameters:
core- the core boundary (full membership)support- the support boundary (membership > 0)
-
FuzzyBoundary2D
Creates a fuzzy boundary with custom membership function.- Parameters:
core- the core boundarysupport- the support boundarymembershipFunction- maps distance ratio to membership [0,1]
-
-
Method Details
-
withBuffer
Creates a fuzzy boundary with a buffer zone around a crisp boundary.- Parameters:
crisp- the crisp boundarybufferWidth- the width of the transition zone- Returns:
- fuzzy boundary
-
getMembership
-
linearMembership
-
sigmoidMembership
-
gaussianMembership
-
fuzzyAnd
Fuzzy AND (intersection) - minimum membership. -
fuzzyOr
Fuzzy OR (union) - maximum membership. -
fuzzyNot
-
alphaCut
Returns a crisp boundary for a given alpha level. Points with membership >= alpha are included.- Parameters:
alpha- the threshold (0 to 1)- Returns:
- the alpha-cut boundary
-
contains
-
getVertices
Description copied from interface:Boundary2DReturns the vertices of this boundary in order.- Specified by:
getVerticesin interfaceBoundary2D- Returns:
- list of vertices
-
getVertexCount
public int getVertexCount()Description copied from interface:Boundary2DReturns the number of vertices.- Specified by:
getVertexCountin interfaceBoundary2D- Returns:
- vertex count
-
getVertex
Description copied from interface:Boundary2DReturns a specific vertex.- Specified by:
getVertexin interfaceBoundary2D- Parameters:
index- the vertex index- Returns:
- the vertex
-
getArea
Description copied from interface:Boundary2DReturns the area of this 2D boundary.- Specified by:
getAreain interfaceBoundary2D- Returns:
- the area
-
getPerimeter
Description copied from interface:Boundary2DReturns the perimeter of this 2D boundary.- Specified by:
getPerimeterin interfaceBoundary2D- Returns:
- the perimeter
-
isConvex
public boolean isConvex()Description copied from interface:Boundary2DChecks if this boundary is convex.- Specified by:
isConvexin interfaceBoundary2D- Returns:
- true if convex
-
isEmpty
-
getCentroid
Description copied from interface:BoundaryReturns the centroid of this boundary.- Specified by:
getCentroidin interfaceBoundary<Point2D>- Returns:
- the geometric center
-
getBoundingBox
Description copied from interface:BoundaryReturns the bounding box of this boundary.- Specified by:
getBoundingBoxin interfaceBoundary<Point2D>- Returns:
- an axis-aligned bounding box
-
intersects
-
union
-
intersection
-
convexHull
-
translate
-
scale
-
rotate
Description copied from interface:Boundary2DRotates the boundary around the centroid.- Specified by:
rotatein interfaceBoundary2D- Parameters:
angleRadians- rotation angle in radians- Returns:
- rotated boundary
-
rotateAround
Description copied from interface:Boundary2DRotates around a specific pivot point.- Specified by:
rotateAroundin interfaceBoundary2D- Parameters:
angleRadians- rotation anglepivot- the pivot point- Returns:
- rotated boundary
-
extrude
Description copied from interface:Boundary2DCreates an extruded 3D boundary from this 2D boundary.- Specified by:
extrudein interfaceBoundary2D- Parameters:
height- the extrusion height- Returns:
- a 3D boundary
-
getCore
-
getSupport
-
toString
-