/* Copyright (c) 1997-2009
   Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Darmstadt, Germany)
   http://www.polymake.de

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version: http://www.gnu.org/licenses/gpl.txt.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
--------------------------------------------------------------------------------
   $Project: polymake $$Id: SparseVector.cc 9471 2010-02-12 18:33:42Z joswig $
*/

#include <polymake.h>
#include <SparseVector.h>
#include <Rational.h>
#include <Vector.h>
#include <SparseMatrix.h>
#include <IncidenceMatrix.h>
#include <Matrix.h>
#include <Integer.h>
#include <linalg.h>

namespace polymake { namespace common {
///==== Automatically generated contents follow.    Please do not delete this line. ====
   template <typename T0>
   FunctionInterface4perl( new_int, T0 ) {
      perl::Value arg0(stack[1]);
      WrapperReturnNew(T0, (arg0.get<int>()) );
   };

   template <typename T0, typename T1>
   FunctionInterface4perl( new_X, T0,T1 ) {
      perl::Value arg0(stack[1]);
      WrapperReturnNew(T0, (arg0.get<T1>()) );
   };

   template <typename T0>
   FunctionInterface4perl( new, T0 ) {
      WrapperReturnNew(T0, () );
   };

   ClassTemplate4perl("Polymake::common::SparseVector");
   Class4perl("Polymake::common::SparseVector__Float", SparseVector< double >);
   Class4perl("Polymake::common::SparseVector__Rational", SparseVector< Rational >);
   Class4perl("Polymake::common::SparseVector__Int", SparseVector< int >);
   OperatorInstance4perl(convert, SparseVector< double >, perl::Canned< const Vector< Rational > >);
   Class4perl("Polymake::common::SparseVector__Integer", SparseVector< Integer >);
   FunctionInstance4perl(new, SparseVector< double >);
   OperatorInstance4perl(convert, SparseVector< double >, perl::Canned< const Vector< double > >);
   FunctionInstance4perl(new, SparseVector< Rational >);
   OperatorInstance4perl(Binary_mul, perl::Canned< const pm::sparse_matrix_line<pm::AVL::tree<pm::sparse2d::traits<pm::sparse2d::traits_base<pm::Rational, true, false, (pm::sparse2d::restriction_kind)0>, false, (pm::sparse2d::restriction_kind)0> > const&, pm::NonSymmetric> >, perl::Canned< const Vector< Rational > >);
   OperatorInstance4perl(Binary_div, perl::Canned< const pm::sparse_matrix_line<pm::AVL::tree<pm::sparse2d::traits<pm::sparse2d::traits_base<pm::Rational, true, false, (pm::sparse2d::restriction_kind)0>, false, (pm::sparse2d::restriction_kind)0> > const&, pm::NonSymmetric> >, perl::Canned< const Rational >);
   FunctionInstance4perl(new_X, SparseVector< double >, perl::Canned< const SparseVector< Rational > >);
   FunctionInstance4perl(new_int, SparseVector< Rational >);
   FunctionInstance4perl(new_X, SparseVector< Rational >, perl::Canned< const pm::sparse_matrix_line<pm::AVL::tree<pm::sparse2d::traits<pm::sparse2d::traits_base<pm::Rational, true, false, (pm::sparse2d::restriction_kind)0>, false, (pm::sparse2d::restriction_kind)0> > const&, pm::NonSymmetric> >);
   OperatorInstance4perl(Unary_neg, perl::Canned< const pm::SameElementSparseVector<pm::SingleElementSet<int>, pm::Rational> >);
   OperatorInstance4perl(Binary__or, perl::Canned< const pm::SameElementSparseVector<pm::SingleElementSet<int>, pm::Rational> >, perl::Canned< const pm::RowChain<pm::Matrix<pm::Rational> const&, pm::SingleRow<pm::SameElementVector<pm::Rational> const&> > >);
   OperatorInstance4perl(Binary_mul, perl::Canned< const pm::sparse_matrix_line<pm::AVL::tree<pm::sparse2d::traits<pm::sparse2d::traits_base<pm::Rational, true, false, (pm::sparse2d::restriction_kind)0>, false, (pm::sparse2d::restriction_kind)0> > const&, pm::NonSymmetric> >, perl::Canned< const pm::IndexedSlice<pm::masquerade<pm::ConcatRows, pm::Matrix_base<pm::Integer> const&>, pm::Series<int, true>, void> >);
///==== Automatically generated contents end here.  Please do not delete this line. ====
} }
