Internals
LinearCombinations.Hashed — Type
LinearCombinations.Hashed{T}Hashed{T}(x::T) is a wrapper that stores hash(x) along with x. Computing the hash of such an element returns the stored hash value.
See also LinearCombinations.unhash.
LinearCombinations.unhash — Function
LinearCombinations.unhash(x)Return the argument unless it is of the form Hashed{T}(y), in which case y is returned.
See also LinearCombinations.Hashed.
LinearCombinations.unval — Function
LinearCombinations.unval(x)Return c if the argument x is of type Val{c} and x itself otherwise.
This can be used to write type-stable code for the coefftype keyword argument to linear and multilinear functions.
See also @linear, @linear_kw, @multilinear.
Examples
julia> LinearCombinations.unval(Char)
Char
julia> LinearCombinations.unval(Val(Char))
CharLinearCombinations.Zero — Type
ZeroZero is a type whose only value Zero() behaves like 0, but allows for simplification at compile time.
LinearCombinations.LinearStyle — Type
LinearCombinations.LinearStyleThe broadcasting style used for linear combinations.
See also @linear_broadcastable.
LinearCombinations.show_summand — Function
LinearCombinations.show_summand(io::IO, x, c)This function is called for each term-coefficient pair x => c of a linear combination that is displayed. By defining additional methods for this function, the output that it printed for certain term or coefficient types can be customized.