SyFi  0.3
swig Namespace Reference

Classes

class  SwigPtr_PyObject
struct  SwigVar_PyObject
struct  stop_iteration
struct  SwigPyIterator
struct  noconst_traits
struct  noconst_traits< const Type >
struct  pointer_category
struct  value_category
struct  traits
struct  traits_info
struct  traits< Type * >
struct  traits_as
struct  traits_check
struct  traits_from_ptr
struct  traits_from
struct  traits_from< Type * >
struct  traits_from< const Type * >
struct  traits_asptr
struct  traits_asval
struct  traits_asval< Type * >
struct  traits_as< Type, value_category >
struct  traits_as< Type, pointer_category >
struct  traits_as< Type *, pointer_category >
struct  traits_check< Type, value_category >
struct  traits_check< Type, pointer_category >
struct  traits< PyObject * >
struct  traits_asval< PyObject * >
struct  traits_check< PyObject *, value_category >
struct  traits_from< PyObject * >
class  SwigPyIterator_T
struct  from_oper
class  SwigPyIteratorOpen_T
class  SwigPyIteratorClosed_T
struct  SwigPySequence_Ref
struct  SwigPySequence_ArrowProxy
struct  SwigPySequence_InputIterator
struct  SwigPySequence_Cont
struct  traits< GiNaC::ex >
struct  traits_asptr_stdseq
struct  traits_from_stdseq
struct  traits_asptr< std::vector< T > >
struct  traits_from< std::vector< T > >
struct  traits< std::vector< GiNaC::ex, std::allocator< GiNaC::ex > > >
struct  traits_asptr< std::pair< T, U > >
struct  traits_from< std::pair< T, U > >
struct  traits< std::pair< GiNaC::ex, GiNaC::ex > >
struct  traits_asptr< std::map< K, T, Compare, Alloc > >
struct  traits_from< std::map< K, T, Compare, Alloc > >
struct  from_key_oper
struct  from_value_oper
struct  SwigPyMapIterator_T
struct  SwigPyMapKeyIterator_T
struct  SwigPyMapValueITerator_T
struct  traits< std::map< GiNaC::ex, GiNaC::ex, GiNaC::ex_is_less, std::allocator< std::pair< GiNaC::ex const, GiNaC::ex > > > >
struct  traits< int >
struct  traits_asval< int >
struct  traits_from< int >
struct  traits< std::pair< GiNaC::ex, int > >
struct  traits< std::map< GiNaC::ex, int, GiNaC::ex_is_less, std::allocator< std::pair< GiNaC::ex const, int > > > >
struct  traits< GiNaC::symbol >
struct  traits< std::pair< GiNaC::symbol, GiNaC::ex > >
struct  traits_asptr< std::list< T > >
struct  traits_from< std::list< T > >
struct  traits< std::list< std::pair< GiNaC::symbol, GiNaC::ex >, std::allocator< std::pair< GiNaC::symbol, GiNaC::ex > > > >
struct  traits< std::list< GiNaC::ex, std::allocator< GiNaC::ex > > >
struct  traits_asptr< std::set< T > >
struct  traits_from< std::set< T > >
struct  traits< std::set< GiNaC::ex, GiNaC::ex_is_less, std::allocator< GiNaC::ex > > >

Functions

template<class Type >
const char * type_name ()
template<class Type >
swig_type_infotype_info ()
template<class Type >
PyObject * from (const Type &val)
template<class Type >
PyObject * from_ptr (Type *val, int owner)
template<class Type >
int asptr (PyObject *obj, Type **vptr)
template<class Type >
int asval (PyObject *obj, Type *val)
template<class Type >
Type as (PyObject *obj, bool te=false)
template<class Type >
bool check (PyObject *obj)
size_t check_index (ptrdiff_t i, size_t size, bool insert=false)
size_t slice_index (ptrdiff_t i, size_t size)
template<class Sequence , class Difference >
Sequence::iterator getpos (Sequence *self, Difference i)
template<class Sequence , class Difference >
Sequence::const_iterator cgetpos (const Sequence *self, Difference i)
template<class Sequence , class Difference >
Sequence * getslice (const Sequence *self, Difference i, Difference j)
template<class Sequence , class Difference , class InputSeq >
void setslice (Sequence *self, Difference i, Difference j, const InputSeq &v=InputSeq())
template<class Sequence , class Difference >
void delslice (Sequence *self, Difference i, Difference j)
template<typename OutIter >
SwigPyIteratormake_output_iterator (const OutIter &current, const OutIter &begin, const OutIter &end, PyObject *seq=0)
template<typename OutIter >
SwigPyIteratormake_output_iterator (const OutIter &current, PyObject *seq=0)
template<class SwigPySeq , class Seq >
void assign (const SwigPySeq &swigpyseq, Seq *seq)
template<class SwigPySeq , class K , class T , class Compare , class Alloc >
void assign (const SwigPySeq &swigpyseq, std::map< K, T, Compare, Alloc > *map)
template<typename OutIter >
SwigPyIteratormake_output_key_iterator (const OutIter &current, const OutIter &begin, const OutIter &end, PyObject *seq=0)
template<typename OutIter >
SwigPyIteratormake_output_value_iterator (const OutIter &current, const OutIter &begin, const OutIter &end, PyObject *seq=0)
template<class SwigPySeq , class T >
void assign (const SwigPySeq &swigpyseq, std::set< T > *seq)

Function Documentation

template<class Type >
Type swig::as ( PyObject *  obj,
bool  te = false 
) [inline]

Definition at line 4020 of file SyFiPYTHON_wrap.cxx.

                                                 {
    return traits_as<Type, typename traits<Type>::category>::as(obj, te);
  }
template<class SwigPySeq , class Seq >
void swig::assign ( const SwigPySeq &  swigpyseq,
Seq *  seq 
) [inline]

Definition at line 4691 of file SyFiPYTHON_wrap.cxx.

Referenced by _wrap_exlist_assign(), _wrap_exvector_assign(), _wrap_symexlist_assign(), and swig::traits_asptr_stdseq< Seq, T >::asptr().

                                               {
    // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
    typedef typename SwigPySeq::value_type value_type;
    typename SwigPySeq::const_iterator it = swigpyseq.begin();
    for (;it != swigpyseq.end(); ++it) {
      seq->insert(seq->end(),(value_type)(*it));
    }
  }
template<class SwigPySeq , class K , class T , class Compare , class Alloc >
void swig::assign ( const SwigPySeq &  swigpyseq,
std::map< K, T, Compare, Alloc > *  map 
) [inline]

Definition at line 5047 of file SyFiPYTHON_wrap.cxx.

                                                                        {
      typedef typename std::map<K,T,Compare,Alloc >::value_type value_type;
      typename SwigPySeq::const_iterator it = swigpyseq.begin();
      for (;it != swigpyseq.end(); ++it) {
        map->insert(value_type(it->first, it->second));
      }
    }
template<class SwigPySeq , class T >
void swig::assign ( const SwigPySeq &  swigpyseq,
std::set< T > *  seq 
) [inline]

Definition at line 5648 of file SyFiPYTHON_wrap.cxx.

                                                       {
      // seq->insert(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
      typedef typename SwigPySeq::value_type value_type;
      typename SwigPySeq::const_iterator it = swigpyseq.begin();
      for (;it != swigpyseq.end(); ++it) {
        seq->insert(seq->end(),(value_type)(*it));
      }
    }
template<class Type >
int swig::asval ( PyObject *  obj,
Type *  val 
) [inline]
template<class Sequence , class Difference >
Sequence::const_iterator swig::cgetpos ( const Sequence *  self,
Difference  i 
) [inline]
template<class Type >
bool swig::check ( PyObject *  obj) [inline]

Definition at line 4041 of file SyFiPYTHON_wrap.cxx.

                                   {
    return traits_check<Type, typename traits<Type>::category>::check(obj);
  }
size_t swig::check_index ( ptrdiff_t  i,
size_t  size,
bool  insert = false 
) [inline]

Definition at line 4130 of file SyFiPYTHON_wrap.cxx.

Referenced by cgetpos(), delslice(), getpos(), getslice(), and setslice().

                                                             {
    if ( i < 0 ) {
      if ((size_t) (-i) <= size)
        return (size_t) (i + size);
    } else if ( (size_t) i < size ) {
      return (size_t) i;
    } else if (insert && ((size_t) i == size)) {
      return size;
    }
    
    throw std::out_of_range("index out of range");
  }
template<class Sequence , class Difference >
void swig::delslice ( Sequence *  self,
Difference  i,
Difference  j 
) [inline]

Definition at line 4216 of file SyFiPYTHON_wrap.cxx.

References check_index(), and slice_index().

Referenced by std_list_Sl_GiNaC_ex_Sg____delitem____SWIG_1(), std_list_Sl_GiNaC_ex_Sg____delslice__(), std_list_Sl_GiNaC_ex_Sg____setitem____SWIG_1(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____delitem____SWIG_1(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____delslice__(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____setitem____SWIG_1(), std_vector_Sl_GiNaC_ex_Sg____delitem____SWIG_1(), std_vector_Sl_GiNaC_ex_Sg____delslice__(), and std_vector_Sl_GiNaC_ex_Sg____setitem____SWIG_1().

                                                       {
    typename Sequence::size_type size = self->size();
    typename Sequence::size_type ii = swig::check_index(i, size, true);
    typename Sequence::size_type jj = swig::slice_index(j, size);
    if (jj > ii) {
      typename Sequence::iterator sb = self->begin();
      typename Sequence::iterator se = self->begin();
      std::advance(sb,ii);
      std::advance(se,jj);
      self->erase(sb,se);
    }
  }
template<class Type >
PyObject* swig::from_ptr ( Type *  val,
int  owner 
) [inline]

Definition at line 3892 of file SyFiPYTHON_wrap.cxx.

References from().

                                                  {
    return traits_from_ptr<Type>::from(val, owner);
  }
template<class Sequence , class Difference >
Sequence::iterator swig::getpos ( Sequence *  self,
Difference  i 
) [inline]
template<class Sequence , class Difference >
Sequence* swig::getslice ( const Sequence *  self,
Difference  i,
Difference  j 
) [inline]

Definition at line 4174 of file SyFiPYTHON_wrap.cxx.

References check_index(), and slice_index().

Referenced by std_list_Sl_GiNaC_ex_Sg____getitem____SWIG_0(), std_list_Sl_GiNaC_ex_Sg____getslice__(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____getitem____SWIG_0(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____getslice__(), std_vector_Sl_GiNaC_ex_Sg____getitem____SWIG_0(), and std_vector_Sl_GiNaC_ex_Sg____getslice__().

                                                             {
    typename Sequence::size_type size = self->size();
    typename Sequence::size_type ii = swig::check_index(i, size);
    typename Sequence::size_type jj = swig::slice_index(j, size);

    if (jj > ii) {
      typename Sequence::const_iterator vb = self->begin();
      typename Sequence::const_iterator ve = self->begin();
      std::advance(vb,ii);
      std::advance(ve,jj);
      return new Sequence(vb, ve);
    } else {
      return new Sequence();
    }
  }
template<typename OutIter >
SwigPyIterator* swig::make_output_iterator ( const OutIter &  current,
const OutIter &  begin,
const OutIter &  end,
PyObject *  seq = 0 
) [inline]

Definition at line 4432 of file SyFiPYTHON_wrap.cxx.

Referenced by _wrap_ex_int_map_begin(), _wrap_ex_int_map_end(), _wrap_ex_int_map_find(), _wrap_ex_int_map_lower_bound(), _wrap_ex_int_map_rbegin(), _wrap_ex_int_map_rend(), _wrap_ex_int_map_upper_bound(), _wrap_exlist_begin(), _wrap_exlist_end(), _wrap_exlist_erase__SWIG_0(), _wrap_exlist_erase__SWIG_1(), _wrap_exlist_insert__SWIG_0(), _wrap_exlist_rbegin(), _wrap_exlist_rend(), _wrap_exmap_begin(), _wrap_exmap_end(), _wrap_exmap_find(), _wrap_exmap_lower_bound(), _wrap_exmap_rbegin(), _wrap_exmap_rend(), _wrap_exmap_upper_bound(), _wrap_exset_begin(), _wrap_exset_end(), _wrap_exset_equal_range(), _wrap_exset_find(), _wrap_exset_insert(), _wrap_exset_lower_bound(), _wrap_exset_rbegin(), _wrap_exset_rend(), _wrap_exset_upper_bound(), _wrap_exvector_begin(), _wrap_exvector_end(), _wrap_exvector_erase__SWIG_0(), _wrap_exvector_erase__SWIG_1(), _wrap_exvector_insert__SWIG_0(), _wrap_exvector_rbegin(), _wrap_exvector_rend(), _wrap_symexlist_begin(), _wrap_symexlist_end(), _wrap_symexlist_erase__SWIG_0(), _wrap_symexlist_erase__SWIG_1(), _wrap_symexlist_insert__SWIG_0(), _wrap_symexlist_rbegin(), _wrap_symexlist_rend(), std_list_Sl_GiNaC_ex_Sg__iterator(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg__iterator(), std_map_Sl_GiNaC_ex_Sc_GiNaC_ex_Sc_GiNaC_ex_is_less_Sg__iterator(), std_map_Sl_GiNaC_ex_Sc_int_Sc_GiNaC_ex_is_less_Sg__iterator(), std_set_Sl_GiNaC_ex_Sc_GiNaC_ex_is_less_Sg__iterator(), and std_vector_Sl_GiNaC_ex_Sg__iterator().

  {
    return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
  }
template<typename OutIter >
SwigPyIterator* swig::make_output_iterator ( const OutIter &  current,
PyObject *  seq = 0 
) [inline]

Definition at line 4439 of file SyFiPYTHON_wrap.cxx.

  {
    return new SwigPyIteratorOpen_T<OutIter>(current, seq);
  }
template<typename OutIter >
SwigPyIterator* swig::make_output_key_iterator ( const OutIter &  current,
const OutIter &  begin,
const OutIter &  end,
PyObject *  seq = 0 
) [inline]

Definition at line 5158 of file SyFiPYTHON_wrap.cxx.

Referenced by std_map_Sl_GiNaC_ex_Sc_GiNaC_ex_Sc_GiNaC_ex_is_less_Sg__key_iterator(), and std_map_Sl_GiNaC_ex_Sc_int_Sc_GiNaC_ex_is_less_Sg__key_iterator().

    {
      return new SwigPyMapKeyIterator_T<OutIter>(current, begin, end, seq);
    }
template<typename OutIter >
SwigPyIterator* swig::make_output_value_iterator ( const OutIter &  current,
const OutIter &  begin,
const OutIter &  end,
PyObject *  seq = 0 
) [inline]

Definition at line 5176 of file SyFiPYTHON_wrap.cxx.

Referenced by std_map_Sl_GiNaC_ex_Sc_GiNaC_ex_Sc_GiNaC_ex_is_less_Sg__value_iterator(), and std_map_Sl_GiNaC_ex_Sc_int_Sc_GiNaC_ex_is_less_Sg__value_iterator().

    {
      return new SwigPyMapValueITerator_T<OutIter>(current, begin, end, seq);
    }
template<class Sequence , class Difference , class InputSeq >
void swig::setslice ( Sequence *  self,
Difference  i,
Difference  j,
const InputSeq &  v = InputSeq() 
) [inline]

Definition at line 4192 of file SyFiPYTHON_wrap.cxx.

References check_index(), SwigPyPacked::size, and slice_index().

Referenced by std_list_Sl_GiNaC_ex_Sg____setitem____SWIG_0(), std_list_Sl_GiNaC_ex_Sg____setslice____SWIG_0(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____setitem____SWIG_0(), std_list_Sl_std_pair_Sl_GiNaC_symbol_Sc_GiNaC_ex_Sg__Sg____setslice____SWIG_0(), std_vector_Sl_GiNaC_ex_Sg____setitem____SWIG_0(), and std_vector_Sl_GiNaC_ex_Sg____setslice____SWIG_0().

                                                                                       {
    typename Sequence::size_type size = self->size();
    typename Sequence::size_type ii = swig::check_index(i, size, true);
    typename Sequence::size_type jj = swig::slice_index(j, size);
    if (jj < ii) jj = ii;
    size_t ssize = jj - ii;
    if (ssize <= v.size()) {
      typename Sequence::iterator sb = self->begin();
      typename InputSeq::const_iterator vmid = v.begin();
      std::advance(sb,ii);
      std::advance(vmid, jj - ii);
      self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end());
    } else {
      typename Sequence::iterator sb = self->begin();
      typename Sequence::iterator se = self->begin();
      std::advance(sb,ii);
      std::advance(se,jj);
      self->erase(sb,se);
      self->insert(sb, v.begin(), v.end());
    }
  }
size_t swig::slice_index ( ptrdiff_t  i,
size_t  size 
) [inline]

Definition at line 4144 of file SyFiPYTHON_wrap.cxx.

Referenced by delslice(), getslice(), and setslice().

                                        {
    if ( i < 0 ) {
      if ((size_t) (-i) <= size) {
        return (size_t) (i + size);
      } else {
        throw std::out_of_range("index out of range");
      }
    } else {
      return ( (size_t) i < size ) ? ((size_t) i) : size;
    }
  }
template<class Type >
swig_type_info* swig::type_info ( ) [inline]

Definition at line 3828 of file SyFiPYTHON_wrap.cxx.

template<class Type >
const char* swig::type_name ( ) [inline]

Definition at line 3811 of file SyFiPYTHON_wrap.cxx.

                                 {
    return traits<typename noconst_traits<Type >::noconst_type >::type_name();
  }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines