Packages

Tastoids are a uniform abstraction of 'taste' and Algebra thereof.

Current section

Files

Jump to
tastoids src tastoids@imbedding.erl
Raw

src/tastoids@imbedding.erl

-module(tastoids@imbedding).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-define(FILEPATH, "src/tastoids/imbedding.gleam").
-export_type([imbedding/1, embedding_to/1]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(
" An Index(space) (or '_Imbedding_') is a set of values ⅈ\n"
" (<= countable ∞) able to map (_embeds_) a 'thing' to its\n"
" imbedded-index ('imbex').\n"
"\n"
" - An index `i` within a countable set , e.g. the integers (ℤ),\n"
" strings, _any set with a semblance of equality/comparability_.\n"
" - An embedding model and its range of possible values from a\n"
" 'thing' to index.\n"
" - A set of indices within that `Index(space)` (untested)\n"
).
-type imbedding(EFY) :: {index, EFY} |
{imbex, embedding_to(EFY)} |
{indices, gleam@set:set(imbedding(EFY))}.
-type embedding_to(EFZ) :: {identity, fun((EFZ) -> EFZ)} |
{embedding, binary(), fun((binary()) -> EFZ)} |
{translating, embedding_to(EFZ), embedding_to(EFZ)}.