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

描述

clearDegreeOfMembership 方法用于清除模糊集合中指定元素的隶属度。

语法

fuzzySet.clearDegreeOfMembership(element);

参数

  • element:要清除隶属度的元素。

返回值

无返回值。

示例

const fruits = new FuzzySet(['apple', 'banana', 'cherry']);
fruits.add('orange');
fruits.add('kiwi', 0.5);
fruits.add('pear', 0.8);

console.log(fruits.getDegreeOfMembership('kiwi'));  // 输出:0.5

fruits.clearDegreeOfMembership('kiwi');

console.log(fruits.getDegreeOfMembership('kiwi'));  // 输出:0

注意事项

  • 若元素不存在于模糊集合中,则不做任何操作。
  • 若元素存在于模糊集合中,但其隶属度为 0,则同样不做任何操作。