Commit e3ea8370 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix XML output for F2.

* include/vaucanson/xml/builders.hxx (get_semiring_operations):
Add specialization to output CyclicSemirings as "field".
* data/vaucanson.xsd: Update it.
parent 5cd4c745
2011-07-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix XML output for F2.
* include/vaucanson/xml/builders.hxx (get_semiring_operations):
Add specialization to output CyclicSemirings as "field".
* data/vaucanson.xsd: Update it.
2011-07-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
 
Add a way to output fully parenthesized expressions.
......
......@@ -230,7 +230,7 @@ Writing data can be added.
<!-- if type="numerical" then use="required" else shouldn't be use -->
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="classical|minPlus|maxPlus|minMax"/>
<xs:pattern value="classical|minPlus|maxPlus|minMax|field"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
......
......@@ -27,6 +27,7 @@
# include <vaucanson/algebra/implementation/monoid/monoid_rep.hh>
# include <vaucanson/algebra/concept/tropical_semiring.hh>
# include <vaucanson/algebra/implementation/semiring/q_number.hh>
# include <vaucanson/algebra/implementation/semiring/cyclic_semiring.hh>
namespace vcsn
{
......@@ -547,6 +548,13 @@ namespace vcsn
get_semiring_operations(const algebra::TropicalSemiring<algebra::TropicalMax>&)
{ return "maxPlus"; }
// This assumes that n is prime. Actually, because we do
// not output n in XML, we only support n==2.
template <unsigned int n>
const char*
get_semiring_operations(const algebra::CyclicSemiring<n>&)
{ return "field"; }
template <typename T>
void
check_monoid_consistency(T&,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment