Gfsm::Semiring - object-oriented interface to libgfsm semiring structures.
use Gfsm; ##------------------------------------------------------------ ## Constructors, etc. $sr = Gfsm::Semiring->new(); $sr2 = $sr->copy(); ##------------------------------------------------------------ ## Properties $typ = $sr->type(); ##-- numeric type $nam = $sr->name(); ##-- symbolic name of type $zero = $sr->zero(); $one = $sr->one(); ##------------------------------------------------------------ ## Predicates & Comparison $bool = $sr->equal($w1,$w2); $bool = $sr->less($w1,$w2); $val = $sr->compare($w1,$w2); ##------------------------------------------------------------ ## Semiring Operations $w = $sr->plus($w1,$w2); $w = $sr->times($w1,$w2); ##-------------------------------------------------------------- ## Utilities $w = Gfsm::gfsm_log_add($w1,$w2); ##-- stable log-addition
Gfsm::Semiring provides an object-oriented interface to the semiring types built into the libgfsm library.
No support for user-defined semirings.
No support for direct reference from perl of semirings embedded in (gfsmAutomaton*)s.
Gfsm(3perl), gfsmutils(1).
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2005 by Bryan Jurish
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
To install Gfsm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gfsm
CPAN shell
perl -MCPAN -e shell install Gfsm
For more information on module installation, please visit the detailed CPAN module installation guide.