MCPcopy Index your code
hub / github.com/diffeo/kodama

github.com/diffeo/kodama @0.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.2 ↗ · + Follow
193 symbols 478 edges 23 files 72 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

kodama

This crate provides a fast implementation of agglomerative hierarchical clustering.

Linux build status

This library is released under the MIT license.

The ideas and implementation in this crate are heavily based on the work of Daniel Müllner, and in particular, his 2011 paper, Modern hierarchical, agglomerative clustering algorithms. Parts of the implementation have also been inspired by his C++ library, fastcluster. Müllner's work, in turn, is based on the hierarchical clustering facilities provided by MATLAB and SciPy.

The runtime performance of this library is on par with Müllner's fastcluster implementation.

For a more detailed example of how to use hierarchical clustering, see the example in the API documentation.

Documentation

https://docs.rs/kodama

Usage

Add this to your Cargo.toml:

[dependencies]
kodama = "0.1"

and this to your crate root:

extern crate kodama;

C API and Go bindings

This repository includes kodama-capi, which provides a C interface to hierarchical clustering.

This repository also includes Go FFI bindings via cgo to the aforementioned C API. Documentation for the Go library can be found at godoc.org/github.com/diffeo/kodama/go-kodama.

Extension points exported contracts — how you extend this code

RangeBound (Interface)
A trait that abstracts over the different types of ranges. We define this ourselves until std::collections::range stabi [4 …
src/active.rs

Core symbols most depended-on inside this repo

range
called by 66
src/active.rs
observations
called by 20
src/condensed.rs
Len
called by 17
go-kodama/kodama.go
priority
called by 16
src/queue.rs
set_priority
called by 16
src/queue.rs
union
called by 15
src/union.rs
remove
called by 14
src/active.rs
push
called by 10
src/dendrogram.rs

Shape

Function 87
Method 77
Class 19
Enum 6
Struct 2
Interface 1
TypeAlias 1

Languages

Rust79%
Go9%
Python4%
C4%
C++3%

Modules by API surface

src/queue.rs24 symbols
src/lib.rs20 symbols
src/active.rs20 symbols
src/dendrogram.rs15 symbols
src/union.rs14 symbols
src/test.rs10 symbols
go-kodama/kodama.go10 symbols
src/generic.rs9 symbols
kodama-bin/src/locations.rs9 symbols
kodama-capi/ctest/test.c8 symbols
experiments/locations.py8 symbols
src/method.rs7 symbols

For agents

$ claude mcp add kodama \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page