CoCoALib-0.9905 date: 23 May 2007


CoCoA4io.H

Go to the documentation of this file.
00001 #ifndef CoCoA_cocoa4io_H
00002 #define CoCoA_cocoa4io_H
00003 
00004 //   Copyright (c)  2007  Anna Bigatti
00005 
00006 //   This file is part of the source of CoCoALib, the CoCoA Library.
00007 
00008 //   CoCoALib is free software; you can redistribute it and/or modify
00009 //   it under the terms of the GNU General Public License (version 2)
00010 //   as published by the Free Software Foundation.  A copy of the full
00011 //   licence may be found in the file COPYING in this directory.
00012 
00013 //   CoCoALib is distributed in the hope that it will be useful,
00014 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //   GNU General Public License for more details.
00017 
00018 //   You should have received a copy of the GNU General Public License
00019 //   along with CoCoA; if not, write to the Free Software
00020 //   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 //#include "CoCoA/library.H"
00023 
00024 #include "CoCoA/TmpGTypes.H"  // PolyList and VectorList
00025 
00026 #include <string>
00027 
00028 namespace CoCoA
00029 {
00030   class SparsePolyRing; // forward declaration -- CoCoA/SparsePolyRing.H
00031   class FreeModule; // forward declaration -- CoCoA/FreeModule.H
00032   class ConstRefRingElem; // forward declaration -- CoCoA/ring.H
00033   class ZZ; // forward declaration -- CoCoA/ZZ.H
00034   class PPOrdering; // forward declaration -- CoCoA/PPOrdering.H
00035   class matrix; // forward declaration -- CoCoA/matrix.H
00036   //----------------------------------------------------------------------
00037   enum SkipTagType {TagWasRead, GetTag};  // used in functions Read...(...)
00038 
00039   //----------------------------------------------------------------------
00040   std::string ReadOperationString(std::istream& in);
00041   void ReadPolyList(std::istream& in, PolyList& PL, const SparsePolyRing& P, SkipTagType ST);
00042   void ReadVectorList(std::istream& in, VectorList& L, const FreeModule& FM, SkipTagType ST);
00043 
00044   // cannot be "void Read..(res, ...)" because there is no empty ctor
00045   // anyway, they are reference counted objects
00046   matrix ReadIntegerMatrix(std::istream& in, SkipTagType ST);
00047   matrix ReadRationalMatrix(std::istream& in, SkipTagType ST);
00048   FreeModule ReadFreeModule(std::istream& in, SkipTagType ST);
00049   SparsePolyRing ReadPolyRing(std::istream& in, SkipTagType ST);
00050   PPOrdering ReadPolyRingOrdering(std::istream& in, size_t NumInds, SkipTagType ST);
00051 
00052   //------------------------------
00053   void PrintTimeToLog(double T);
00054   void PrintTimeToCoCoA4(double T);
00055   void PrintVersionToCoCoA4();
00056 
00057   void WritePolyRing(std::ostream& out, const SparsePolyRing& P);
00058   void WriteMonomials(std::ostream& out, ConstRefRingElem p);
00059   void WriteMatrixInVar(std::ostream& out, const std::string& VarName, const matrix &M);
00060   void WritePolyListInVar(std::ostream& out, const std::string& VarName, const PolyList& PL);
00061   void WriteVectorListInVar(std::ostream& out, const std::string& VarName, const VectorList& VL);
00062   //----------------------------------------------------------------------
00063   void AssertTag(const std::string& input_tag, const std::string& expected_tag);
00064   void SkipTag(std::istream& in, const std::string& expected_tag);
00065   void ThrowInputError(const std::string& unknown_tag);
00066 
00067   //----------------------------------------------------------------------
00068   SparsePolyRing NewPolyRingServer(ZZ charact, size_t FloatPrecision, size_t NumParams, const PPOrdering& O);
00069 }
00070 
00071 
00072 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/CoCoA4io.H,v 1.1 2007/04/27 14:54:22 bigatti Exp $
00073 // $Log: CoCoA4io.H,v $
00074 // Revision 1.1  2007/04/27 14:54:22  bigatti
00075 // -- content of CoCoAServer.C split into dedicated files
00076 // -- new registration mechanism (through include "RegisterServerOps.H")
00077 //
00078 
00079 #endif

Generated on Wed May 23 13:45:22 2007 for CoCoALib by  doxygen 1.4.6