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 (ⅈ), AND imbed: 𝔸(..) -> aᵢ is a bijective imbedding of ‘a’ subject into 𝕍/ⅈ

Then, 𝛂aᵢ ∈ 𝔸 are the set of all ‘unit’ tastes (scaled by 𝛂)

Types

A Taste of a given index with values sharing the same types.

pub opaque type Taste(index)

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 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 negate(t: Taste(index)) -> Taste(index)

Returns the ‘negative’ of a taste (like <-> dislike)

pub const one: Float

A taste sentiment of 1.0

pub fn scale(
  taste: Taste(index),
  by weight: Float,
) -> Taste(index)

Scale the given tastes by its ‘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 how many of them there are

pub const tasteless: Taste(a)

Alias for Nil, the empty taste—sans index—shared by every embedding-space

Search Document