/** @import { InputType } from "../index.js" */ /** @import { ParametersOptics } from "./index.js" */ /** @typedef {Object} DBEntry * @property {Float64Array} element * @property {number} index * @property {number} [reachability_distance] * @property {boolean} processed * @property {DBEntry[]} [neighbors] */ /** * OPTICS (Ordering Points To Identify the Clustering Structure) * * A density-based clustering algorithm that extends DBSCAN. It handles clusters of varying * densities and produces a reachability plot that can be used to extract clusters. * * @class * @extends Clustering * @category Clustering */ export class OPTICS extends Clustering { /** * **O**rdering **P**oints **T**o **I**dentify the **C**lustering **S**tructure. * * @param {InputType} points - The data. * @param {Partial} [parameters={}] * @see {@link https://www.dbs.ifi.lmu.de/Publikationen/Papers/OPTICS.pdf} * @see {@link https://en.wikipedia.org/wiki/OPTICS_algorithm} */ constructor(points: InputType, parameters?: Partial); /** * @private * @type {DBEntry[]} */ private _ordered_list; /** @type {number[][]} */ _clusters: number[][]; /** * @private * @type {DBEntry[]} */ private _DB; _cluster_index: number; /** * @private * @param {DBEntry} p - A point of the data. * @returns {DBEntry[]} An array consisting of the `epsilon`-neighborhood of `p`. */ private _get_neighbors; /** * @private * @param {DBEntry} p - A point of `matrix`. * @returns {number|undefined} The distance to the `min_points`-th nearest point of `p`, or undefined if the * `epsilon`-neighborhood has fewer elements than `min_points`. */ private _core_distance; /** * Updates the reachability distance of the points. * * @private * @param {DBEntry} p * @param {Heap} seeds */ private _update; /** * Expands the `cluster` with points in `seeds`. * * @private * @param {Heap} seeds * @param {number[]} cluster */ private _expand_cluster; /** * Returns an array of clusters. * * @returns {number[][]} Array of clusters with the indices of the rows in given `matrix`. */ get_clusters(): number[][]; /** * @returns {number[]} Returns an array, where the ith entry defines the cluster affirmation of the ith point of * given data. (-1 stands for outlier) */ get_cluster_list(): number[]; } export type DBEntry = { element: Float64Array; index: number; reachability_distance?: number | undefined; processed: boolean; neighbors?: DBEntry[] | undefined; }; import type { ParametersOptics } from "./index.js"; import { Clustering } from "./Clustering.js"; import type { InputType } from "../index.js"; //# sourceMappingURL=OPTICS.d.ts.map