biomcmc-lib  0.1
low level library for phylogenetic analysis
clustering_goptics.h
Go to the documentation of this file.
1 /*
2  * This file is part of biomcmc-lib, a low-level library for phylogenomic analysis.
3  * Copyright (C) 2019-today Leonardo de Oliveira Martins [ leomrtns at gmail.com; http://www.leomartins.org ]
4  *
5  * biomcmc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6  * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  *
9  * Copyright (C) 2019-today Leonardo de Oliveira Martins [ leomrtns at gmail.com; http://www.leomartins.org ]
10  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
11  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  * details (file "COPYING" or http://www.gnu.org/copyleft/gpl.html).
13  */
14 
18 #ifndef _biomcmc_clustering_goptics_h_
19 #define _biomcmc_clustering_goptics_h_
20 
21 #include "distance_generator.h"
22 
24 
26 {
27  int *Va_i, *Va_n; // Va_i[pts] where starts at Ea_ids and Ea_dist list; va_n[pts] = number of neighbours <both opaque>
28  double epsilon;
29  int min_points, num_edges, n_clusters; // minpts from user, num_edges = number of dists < epsilon
30  int *order, n_order, *cluster; // samples sorted by reachability order, and cluster= ordered cluster number (i.e. cluster[i] corresponds to seq[i])
31  double *core_distance, *reach_distance, max_distance; // max_dist is a convenience number to replace DBL_MAX in output
32  bool *core;
33  void *Ea, *heap, *points; // void b/c I don't want to expose local structs
34  double timing_secs;
35  distance_generator d; // d->n_samples
36 };
37 
38 goptics_cluster new_goptics_cluster (distance_generator dg, int min_points, double epsilon);
39 goptics_cluster new_goptics_cluster_run (distance_generator dg, int min_points, double epsilon);
40 void del_goptics_cluster (goptics_cluster gop);
41 void assign_goptics_clusters (goptics_cluster gop, double cluster_eps);
42 
43 #endif
Definition: distance_generator.h:20
Definition: clustering_goptics.h:25
distance calculation between generic objects,without generating full matrix beforehand ...