tastoids/taste
Tastes, broadly are any indexable sentiment (or lack thereof), able to participate in the Tastoid algebra
Apart from the 0-ideal/Nil taste (tasteless), Tastes must share a
given index(-space) i.e. strings, Ints, or sets/combinations thereof
More algebraically:
Consider that the set of all Vectors are a field ℝⁿ (aka 𝕍),
AND i is an enumerable (countable) set of indices (ⅈ) with
imbed(a ∈ 𝔸) -> aᵢ (a bijective imbedding of ‘a’ subject into 𝕍/ⅈ)
Then, 𝛂aᵢ ∈ 𝔸 are the set of all ‘unit’ tastes (scaled by 𝛂)
Types
Values
pub fn add(
taste t: Taste(index),
to u: Taste(index),
) -> Taste(index)
Combine two tastes, linearly adding their sentiments (per index) a la ‘scalar addition’
pub fn condense(taste: Taste(index)) -> Taste(set.Set(index))
Returns a combined taste, where n taste indices become one set of its indices, with its value representing the sum of their sentiments.
pub fn from_one(of index: index) -> Taste(index)
Return a singular of ‘index’, a la Taste(index, 1.0)
pub fn from_tuples(
from indexed_tastes: List(#(index, Float)),
) -> Taste(index)
Return a Tastes(index) consisting of the provided #(index, value: Float) tuples.
pub fn indices(of taste: Taste(index)) -> set.Set(index)
Returns the combined set of sentiment indices of a Taste
pub fn length(of taste: Taste(index)) -> Float
Returns the combined sentiments of the entire Taste.
pub fn multiply(
t: Taste(space),
by u: Taste(space),
) -> Taste(space)
Return the and-ish product of two tastes. Multiplying the indices between—possibly sparse—amplifying shared indices and nullifying ones they don’t (i.e. they were multiplied by zero).
pub fn scale(
taste: Taste(index),
by weight: Float,
) -> Taste(index)
Scale the given tastes by a portion (weight)–relative to its ‘natural’ values–a la scalar multiplication.
_Note from Avery: While this could be accomplished via a Tastoid’s cardinality, I wanted keep the notion of a signal’s ‘worth’ (the scale of its impression) distinct from its quantity.