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

frobeniusNorm

介绍

frobeniusNorm是在Yuka js库的Matrix3中实现的一个函数,用于计算矩阵的弗罗贝尼乌斯范数。

弗罗贝尼乌斯范数是矩阵中每个元素的平方和的平方根,可以用来度量矩阵的大小和形状。

语法

Matrix3.frobeniusNorm()

参数

返回值

类型: number

返回矩阵的弗罗贝尼乌斯范数,即每个元素的平方和的平方根。

示例

const matrix = new Matrix3();

matrix.set(1, 2, 3, 4, 5, 6, 7, 8, 9);

const frobeniusNorm = matrix.frobeniusNorm(); // 16.881943016134134

注意事项

  • 该函数只能用于Matrix3类实例。

  • 弗罗贝尼乌斯范数的计算公式为:$\sqrt{(\sum_{i=1}^{m} \sum_{j=1}^{n} |a_{ij}|^2)}$,其中$a_{ij}$表示矩阵中第$i$行第$j$列的元素。