30 #ifndef UPROC_ECURVE_H
31 #define UPROC_ECURVE_H
198 void (*progress)(
double),
226 void (*progress)(
double),
const char *pathfmt,
245 void (*progress)(
double),
const char *pathfmt,
292 const char *pathfmt, ...);
312 const char *pathfmt, va_list ap);
int uproc_ecurve_mmap_store(const uproc_ecurve *ecurve, const char *pathfmt,...)
Store ecurve in a format suitable for uproc_ecurve_mmap()
uproc_family family
Protein family.
Definition: ecurve.h:66
int uproc_ecurve_storev(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, enum uproc_io_type iotype, const char *pathfmt, va_list ap)
Store ecurve to file.
int uproc_ecurve_storep(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, enum uproc_io_type iotype, void(*progress)(double), const char *pathfmt,...)
Store ecurve to file.
int uproc_ecurve_lookup(const uproc_ecurve *ecurve, const struct uproc_word *word, struct uproc_word *lower_neighbour, uproc_family *lower_class, struct uproc_word *upper_neighbour, uproc_family *upper_class)
Find the closest neighbours of a word in the ecurve.
int uproc_ecurve_stores(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, uproc_io_stream *stream)
Store ecurve to stream.
List of homogenous items (also known as "vector" or "arraylist")
uproc_ecurve * uproc_ecurve_loadpv(enum uproc_ecurve_format format, enum uproc_io_type iotype, void(*progress)(double), const char *pathfmt, va_list ap)
Load ecurve from file.
int uproc_ecurve_mmap_storev(const uproc_ecurve *ecurve, const char *pathfmt, va_list ap)
Store ecurve to mmap file.
uproc_ecurve * uproc_ecurve_create(const char *alphabet, size_t suffix_count)
Create ecurve object.
Out of bounds.
Definition: ecurve.h:87
No exact match.
Definition: ecurve.h:84
Module: Amino acid translation alphabets.
void uproc_ecurve_destroy(uproc_ecurve *ecurve)
Destroy ecurve object.
uproc_ecurve * uproc_ecurve_mmap(const char *pathfmt,...)
Map a file to an ecurve.
int uproc_ecurve_storepv(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, enum uproc_io_type iotype, void(*progress)(double), const char *pathfmt, va_list ap)
Store ecurve to file.
uproc_ecurve * uproc_ecurve_loadv(enum uproc_ecurve_format format, enum uproc_io_type iotype, const char *pathfmt, va_list ap)
Load ecurve from file.
uproc_ecurve * uproc_ecurve_mmapv(const char *pathfmt, va_list ap)
Store ecurve to file.
int uproc_ecurve_add_prefix(uproc_ecurve *ecurve, uproc_prefix pfx, uproc_list *suffixes)
Add a prefix entry.
uint_least64_t uproc_suffix
Type for suffixes.
Definition: common.h:84
uproc_ecurve * uproc_ecurve_loadp(enum uproc_ecurve_format format, enum uproc_io_type iotype, void(*progress)(double), const char *pathfmt,...)
Load ecurve from file.
Machine-dependent binary format.
Definition: ecurve.h:75
int uproc_ecurve_storeps(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, void(*progress)(double), uproc_io_stream *stream)
Store ecurve to stream.
Module: Amino acid words.
int uproc_ecurve_finalize(uproc_ecurve *ecurve)
Finalize ecurve.
uproc_suffix suffix
Suffix.
Definition: ecurve.h:63
uproc_ecurve_format
Storage format.
Definition: ecurve.h:70
Portable plain text file.
Definition: ecurve.h:72
Optionally compressed I/O stream.
uint_least32_t uproc_prefix
Type for prefixes.
Definition: common.h:65
uproc_ecurve * uproc_ecurve_loads(enum uproc_ecurve_format format, uproc_io_stream *stream)
Load ecurve from stream.
int uproc_ecurve_store(const uproc_ecurve *ecurve, enum uproc_ecurve_format format, enum uproc_io_type iotype, const char *pathfmt,...)
Store ecurve to file.
Amino acid word.
Definition: word.h:45
uint_least16_t uproc_family
Identifier of a protein family.
Definition: common.h:93
Exact match.
Definition: ecurve.h:81
uproc_ecurve * uproc_ecurve_load(enum uproc_ecurve_format format, enum uproc_io_type iotype, const char *pathfmt,...)
Load ecurve from file.
Pair of suffix and family.
Definition: ecurve.h:60
uproc_alphabet * uproc_ecurve_alphabet(const uproc_ecurve *ecurve)
Return the internal alphabet.
void uproc_ecurve_munmap(uproc_ecurve *ecurve)
Release mapping and close the underlying file descriptor.
uproc_io_type
Underlying stream type.
Definition: io.h:59