-module(gleam_synapses@codec). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([new/2, encode/2, decode/2, to_json/1, from_json/1]). -file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/codec.gleam", 28). -spec new( list({binary(), boolean()}), gleam@iterator:iterator(gleam@dict:dict(binary(), binary())) ) -> gleam_zlists@interop:z_list(gleam_synapses@model@encoding@attribute@attribute:attribute()). new(Attributes, Data_points) -> _pipe = Attributes, _pipe@1 = gleam_zlists:of_list(_pipe), _pipe@2 = gleam_synapses@model@encoding@preprocessor:init( _pipe@1, Data_points ), gleam_synapses@model@encoding@preprocessor:realized(_pipe@2). -file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/codec.gleam", 46). -spec encode( gleam_zlists@interop:z_list(gleam_synapses@model@encoding@attribute@attribute:attribute()), gleam@dict:dict(binary(), binary()) ) -> list(float()). encode(Codec, Data_point) -> _pipe = Codec, _pipe@1 = gleam_synapses@model@encoding@preprocessor:encode( _pipe, Data_point ), gleam_zlists:to_list(_pipe@1). -file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/codec.gleam", 62). -spec decode( gleam_zlists@interop:z_list(gleam_synapses@model@encoding@attribute@attribute:attribute()), list(float()) ) -> gleam@dict:dict(binary(), binary()). decode(Codec, Encoded_values) -> Values = gleam_zlists:of_list(Encoded_values), gleam_synapses@model@encoding@preprocessor:decode(Codec, Values). -file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/codec.gleam", 68). -spec to_json( gleam_zlists@interop:z_list(gleam_synapses@model@encoding@attribute@attribute:attribute()) ) -> binary(). to_json(Codec) -> gleam_synapses@model@encoding@preprocessor:to_json(Codec). -file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/codec.gleam", 74). -spec from_json(binary()) -> gleam_zlists@interop:z_list(gleam_synapses@model@encoding@attribute@attribute:attribute()). from_json(Json) -> _pipe = Json, _pipe@1 = gleam_synapses@model@encoding@preprocessor:of_json(_pipe), gleam_synapses@model@encoding@preprocessor:realized(_pipe@1).