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

getDegreeOfMembership

介绍

该方法用于计算由正态分布模糊集(NormalDistFuzzySet)表示的模糊集中给定元素的隶属度。

语法

NormalDistFuzzySet.getDegreeOfMembership(x);

参数

  • x: 表示要计算隶属度的元素。

返回值

一个数字,表示元素 x 在正态分布模糊集中的隶属度。

示例

const set = new Yuka.NormalDistFuzzySet(20, 10);
set.getDegreeOfMembership(20); // 1
set.getDegreeOfMembership(30); // 0.1353

引用

  • Zadeh, L. A. (1965). Fuzzy sets. Information and control, 8(3), 338-353.

注意事项

  • 参数 x 必须是数字类型。
  • 在计算隶属度时,会将 x 带入到正态分布函数中进行计算,因此会消耗相应的计算资源。