Protocols
The following protocols are available globally.
-
A type that defines an addition operator and an additive identity.
See moreDeclaration
Swift
public protocol Addable
-
A matrix whose dimensions are determined at compile time.
See moreDeclaration
Swift
public protocol ConstantSizeMatrix : MatrixBase
-
An 2-dimensional NxM list of elements of some type.
Most mathematical operations are in the
See moreMatrixOperationsBase
protocol. Although logically,MatrixBase
represents a matrix and so should require the operations, in practice the majority of implementations don’t need the full flexibility, so it’s a lot of wasted boilerplate. Classes may conform toMatrixOperationsBase
to implement the full spectrum of matrix operations.Declaration
Swift
public protocol MatrixBase : Equatable
-
A matrix whose dimensions are determined at compile time and whose rows equal its columns.
See moreDeclaration
Swift
public protocol SquareMatrix : ConstantSizeMatrix
-
A matrix whose elements are FloatingPoint.
See moreDeclaration
Swift
public protocol FloatingPointMatrix : MatrixOperationsBase where Self.ElementType : FloatingPoint
-
A matrix declaring the full suite of mathematical operations (addition, scalar addition, multiplication, scalar multiplication, etc).
See moreDeclaration
Swift
public protocol MatrixOperationsBase : MatrixBase
-
A type that defines a multiplication operator and multiplicative identity.
See moreDeclaration
Swift
public protocol Multiplicable
-
A vector whose number of components is defined at compile time and whose components are of type FloatingPoint.
See moreDeclaration
Swift
public protocol ConstantSizeFloatingPointVector : ConstantSizeVector, FloatingPointVector
-
A Vector whose number of components is determined at compile time.
See moreDeclaration
Swift
public protocol ConstantSizeVector : Addable, VectorBase
-
A vector whose components are floating point numbers.
See moreDeclaration
Swift
public protocol FloatingPointVector : SignedVectorBase where Self.ComponentType : FloatingPoint
-
A vector whose components are signed numerics.
See moreDeclaration
Swift
public protocol SignedVectorBase : VectorBase where Self.ComponentType : SignedNumeric
-
Interface for a mathematical n-component vector, which is a a structure that contains n independent numeric components.
See moreDeclaration
Swift
public protocol VectorBase : Equatable