File perl-Algorithm-ClusterPoints.spec of Package perl-Algorithm-ClusterPoints
#
# spec file for package perl-Algorithm-ClusterPoints
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Algorithm-ClusterPoints
Version: 0.08
Release: 0
%define cpan_name Algorithm-ClusterPoints
Summary: Find Clusters Inside a Set of Points
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Algorithm-ClusterPoints/
Source0: http://www.cpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
This module implements an algorithm to find clusters of points inside a
set.
Clusters are defined as sets of points where it is possible to stablish a
way between any pair of points moving from point to point inside the
cluster in steps smaller than a given radius.
Points can have any dimension from one to infinitum, though the algorithm
performance degrades quickly as the dimension increases (it has O((2*D)^D)
complexity).
The algorithm input parameters are:
* $dimension
Dimension of the problem space. For instance, for finding clusters on a
geometric plane, dimension will be 2.
* $radius
A point is part of a cluster when there is at least another point from the
cluster that is at a distance smaller than $radius from it.
* $minimum_size
Minimum_number of points required to form a cluster, the default is one.
* @points
The coordinates of the points
* $ordered
Order the points inside the clusters by their indexes and also order the
clusters by the index of the contained points.
Ordering the output data is optional because it can be an computational
expensive operation.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes example README
%changelog