GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
c_exec.c File Reference

Cluster library - Exectute clusterring. More...

#include <grass/cluster.h>
#include <grass/glocale.h>
Include dependency graph for c_exec.c:

Go to the source code of this file.

Functions

int I_cluster_exec (struct Cluster *C, int maxclass, int iterations, double convergence, double separation, int min_class_size, int(*checkpoint)(), int *interrupted)
 

Detailed Description

Cluster library - Exectute clusterring.

(C) 2001-2009 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Original author CERL

Definition in file c_exec.c.

Function Documentation

◆ I_cluster_exec()

int I_cluster_exec ( struct Cluster C,
int  maxclass,
int  iterations,
double  convergence,
double  separation,
int  min_class_size,
int(*)()  checkpoint,
int *  interrupted 
)
Parameters
Cpointer to Cluster structure
maxclassmaximum number of classes
iterationsmaximum number of iterations
convergencepercentage of points stable
separationminimum distance between class centroids
min_class_sizeminimum size of class
checkpointroutine to be called at various steps
interruptedboolean to check for interrupt
Returns
0 ok
-1 out of memory
-2 interrupted
1 not enough data points

Definition at line 32 of file c_exec.c.

References _, G_warning(), I_cluster_assign(), I_cluster_distinct(), I_cluster_exec_allocate(), I_cluster_means(), I_cluster_merge(), I_cluster_reassign(), I_cluster_reclass(), I_cluster_signatures(), I_cluster_sum2(), if(), Cluster::nclasses, and Cluster::npoints.