C# · Introspection

Introspection

using Cloud.Unum.USearch; 3.0.0-rc.1 · 4c3e5023

DenseIndexDescription description = index.Describe();    // Metadata, size, capacity, memory, capabilities
DenseReachability reachability = index.On(pool).Health();   // Audited, Reachable, Sweeps
ulong stored = index.On(pool).Count(key);                 // Entries under the key; Contains(key) tests for any
string kernels = USearchCapabilities.CapabilitiesAvailable();

Health audits how much of the graph a search reaches from its landmarks; entries it misses stay unfound until a refinement re-links them. USearchCapabilities also reports the linked library’s Version() and the CapabilitiesCompiled() into it, tied to no index.

API

ClassNamesThe dense spellings of Names.2
DenseIndex.cs:47 ↗
class Names

The canonical lowercase, dash-separated spelling of every closed set, read from the C name tables rather than restated here, and the inverse that reads one back.

NameSpells a metric kind, as DenseMetric.Inner spells "inner".
DenseIndex.cs:53 ↗
string Name(this DenseMetric metric);
string Name(this Status status);

Spells a status, as Status.ShapeMismatch spells "shape-mismatch".

string Name(this Scalar scalar);

Spells a scalar kind, as Scalar.F32 spells "f32".

string Name(this Mood mood);

Spells a mood, as Mood.Parked spells "parked".

string Name(this Residency residency);

Spells a residency, as Residency.Vram spells "vram".

string Name(this Traversal traversal);

Spells a traversal, as Traversal.Scan spells "scan".

Calls usearch_dense_metric_name.

Parameters

metricThe metric kind to spell.
statusThe status to spell.
scalarThe scalar kind to spell.
moodThe mood to spell.
residencyThe residency to spell.
traversalThe traversal to spell.

Returns

The canonical spelling.

TryParseReads a metric kind back from its spelling.
DenseIndex.cs:59 ↗
bool TryParse(string name, out DenseMetric metric);
bool TryParse(string name, out Status status);

Reads a status back from its spelling.

bool TryParse(string name, out Scalar scalar);

Reads a scalar kind back from its spelling.

bool TryParse(string name, out Mood mood);

Reads a mood back from its spelling.

bool TryParse(string name, out Residency residency);

Reads a residency back from its spelling.

bool TryParse(string name, out Traversal traversal);

Reads a traversal back from its spelling.

Calls usearch_dense_metric_from_name.

Parameters

nameThe canonical spelling.
metricThe metric kind it spells.
statusThe status it spells.
scalarThe scalar kind it spells.
moodThe mood it spells.
residencyThe residency it spells.
traversalThe traversal it spells.

Returns

True when the spelling names a metric kind, false otherwise.

ClassUSearchCapabilitiesLibrary-wide probes, tied to no index instance.3
Types.cs:1566 ↗
class USearchCapabilities
VersionReports the version of the linked library.
Types.cs:1570 ↗
string Version();

Calls usearch_version_name.

Returns

The version string.

CapabilitiesCompiledLists the hardware capabilities the linked binary was compiled with, comma separated.
Types.cs:1575 ↗
string CapabilitiesCompiled();

Calls usearch_capabilities_compiled.

Returns

The capability names.

CapabilitiesAvailableLists the hardware capabilities the current machine offers at runtime, comma separated.
Types.cs:1581 ↗
string CapabilitiesAvailable();

Calls usearch_capabilities_available.

Returns

The capability names.