Internals

LinearCombinations.unvalFunction
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))
Char
source
LinearCombinations.show_summandFunction
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.

source