Home Manual Reference Source
public class | source

Measure

Abstract Measure class.

Constructor Summary

Public Constructor
public

Constructor, stores the monoid.

Member Summary

Public Members
public

monoid: *

Method Summary

Public Methods
public

measure(_element: *)

Returns the measure of an element.

public

plus(a: *, b: *, c: *): *

Adds measures together using monoid#plus.

public

zero(): *

Returns the zero measure according to the monoid.

Public Constructors

public constructor() source

Constructor, stores the monoid.

Public Members

public monoid: * source

Public Methods

public measure(_element: *) source

Returns the measure of an element. Must be implemented by classes extending Measure

Params:

NameTypeAttributeDescription
_element *

public plus(a: *, b: *, c: *): * source

Adds measures together using monoid#plus.

Params:

NameTypeAttributeDescription
a *
b *
c *
  • optional
  • default: undefined

Return:

*

public zero(): * source

Returns the zero measure according to the monoid.

Return:

*