Files
perl-Math-Symbolic/perl-Math-Symbolic.spec

117 lines
4.4 KiB
RPMSpec

#
# spec file for package perl-Math-Symbolic (Version 0.606)
#
# Copyright (c) 2010 SUSE LINUX Products 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-Math-Symbolic
Version: 0.606
Release: 1
License: CHECK(GPL+ or Artistic)
%define cpan_name Math-Symbolic
Summary: Math::Symbolic Perl module
Url: http://search.cpan.org/dist/Math-Symbolic/
Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/S/SM/SMUELLER/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl(Module::Build)
BuildRequires: perl-macros
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Memoize) >= 1.01
BuildRequires: perl(Module::Build)
BuildRequires: perl(Parse::RecDescent)
BuildRequires: perl(Test::More)
Requires: perl(Data::Dumper)
Requires: perl(Memoize) >= 1.01
Requires: perl(Parse::RecDescent)
Requires: perl(Test::More)
%{perl_requires}
%description
Math::Symbolic is intended to offer symbolic calculation capabilities to
the Perl programmer without using external (and commercial) libraries
and/or applications.
Unless, however, some interested and knowledgable developers turn up to
participate in the development, the library will be severely limited by my
experience in the area. Symbolic calculations are an active field of
research in CS.
There are several ways to construct Math::Symbolic trees. There are no
actual Math::Symbolic objects, but rather trees of objects of subclasses of
Math::Symbolic. The most general but unfortunately also the least intuitive
way of constructing trees is to use the constructors of the
Math::Symbolic::Operator, Math::Symbolic::Variable, and
Math::Symbolic::Constant classes to create (nested) objects of the
corresponding types.
Furthermore, you may use the overloaded interface to apply the standard
Perl operators (and functions, see the OVERLOADED OPERATORS manpage) to
existing Math::Symbolic trees and standard Perl expressions.
Possibly the most convenient way of constructing Math::Symbolic trees is
using the builtin parser to generate trees from expressions such as '2 *
x^5'. You may use the Math::Symbolic->parse_from_string() class method for
this.
Of course, you may combine the overloaded interface with the parser to
generate trees with Perl code such as "$term * 5 * 'sin(omega*t+phi)'"
which will create a tree of the existing tree $term times 5 times the sine
of the vars omega times t plus phi.
There are several modules in the distribution that contain subroutines
related to calculus. These are not loaded by Math::Symbolic by default.
Furthermore, there are several extensions to Math::Symbolic available from
CPAN as separate distributions. Please refer to the SEE ALSO manpage for an
incomplete list of these.
For example, Math::Symbolic::MiscCalculus come with Math::Symbolic and
contains routines to compute Taylor Polynomials and the associated errors.
Routines related to vector calculus such as grad, div, rot, and Jacobi- and
Hesse matrices are available through the Math::Symbolic::VectorCalculus
module. This module is also able to compute Taylor Polynomials of functions
of two variables, directional derivatives, total differentials, and
Wronskian Determinants.
Some basic support for linear algebra can be found in
Math::Symbolic::MiscAlgebra. This includes a routine to compute the
determinant of a matrix of Math::Symbolic trees.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes examples README TODO Yapp.yp
%changelog