NAME

Gfsm::Semiring - object-oriented interface to libgfsm semiring structures.

SYNOPSIS

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

DESCRIPTION

Gfsm::Semiring provides an object-oriented interface to the semiring types built into the libgfsm library.

BUGS AND LIMITATIONS

  • No support for user-defined semirings.

  • No support for direct reference from perl of semirings embedded in (gfsmAutomaton*)s.

SEE ALSO

Gfsm(3perl), gfsmutils(1).

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

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.