GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
c_nclasses.c
Go to the documentation of this file.
1
/*!
2
\file cluster/c_nclasses.c
3
4
\brief Cluster library - Number of classes
5
6
(C) 2001-2009 by the GRASS Development Team
7
8
This program is free software under the GNU General Public License
9
(>=v2). Read the file COPYING that comes with GRASS for details.
10
11
\author Original author CERL
12
*/
13
14
#include <
grass/cluster.h
>
15
16
/*!
17
\brief Get number of classes
18
19
\param C pointer to Cluster structure
20
\param minsize minimum class size
21
22
\return number of classes
23
*/
24
int
I_cluster_nclasses
(
struct
Cluster
*C,
int
minsize)
25
{
26
int
i, n;
27
28
n = 0;
29
for
(i = 0; i < C->
nclasses
; i++)
30
if
(C->
count
[i] >= minsize)
31
n++;
32
return
n;
33
}
Cluster::nclasses
int nclasses
Definition:
cluster.h:27
Cluster
Definition:
cluster.h:7
Cluster::count
int * count
Definition:
cluster.h:19
I_cluster_nclasses
int I_cluster_nclasses(struct Cluster *C, int minsize)
Get number of classes.
Definition:
c_nclasses.c:24
cluster.h
lib
cluster
c_nclasses.c
Generated on Tue Feb 14 2023 05:55:58 for GRASS GIS 8 Programmer's Manual by
1.8.13