AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

clearDegreeOfMembership

描述

该函数用于清除模糊或操作中元素的隶属度。

语法

FuzzyOR.clearDegreeOfMembership(element)

参数

  • element:要清除隶属度的元素(必填)

示例

var element1 = {x: 5, y: 7};
var element2 = {x: 8, y: 3};
var element3 = {x: 2, y: 9};

// 创建模糊或操作对象
var or = new FuzzyOR();
or.add(element1, 0.8);
or.add(element2, 0.6);
or.add(element3, 0.7);

// 清除元素2的隶属度
or.clearDegreeOfMembership(element2);

// 输出结果
console.log(or.elements);  
/*
[ 
  { element: { x: 5, y: 7 }, degreeOfMembership: 0.8 },
  { element: { x: 2, y: 9 }, degreeOfMembership: 0.7 } 
]
*/

返回值

该函数没有返回值。

注意事项

  • 如果传入的元素不存在于模糊或操作中,则该函数不起作用。
  • 如果传入的元素隶属度已经为0,则该函数不起作用。