quadrupole: Quadrupole tensor

View source: R/quadrupole.R

quadrupoleR Documentation

Quadrupole tensor

Description

Computes the trace-free mass quadrupole tensor of a set of point masses in arbitrary dimensions,

\mathbf{Q} = \sum_i m_i \left( d\,\mathbf{x}_i\mathbf{x}_i^\mathrm{T} - |\mathbf{x}_i|^2\mathbf{I} \right),

where d is the dimensionality of the points and \mathbf{I} is the d\times d identity matrix.

Usage

quadrupole(x, m = 1)

Arguments

x

Numeric vector or matrix. If a matrix is supplied, each row is interpreted as a point.

m

Numeric scalar or vector of point masses. If a scalar is supplied, the same mass is assigned to every point.

Value

A symmetric d\times d matrix containing the trace-free quadrupole tensor.

See Also

moments, inertia


cooltools documentation built on Sept. 11, 2026, 5:06 p.m.