order_traits.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_orderings_order_traits_h_
#define polybori_orderings_order_traits_h_
// include basic definitions
#include <polybori/pbori_defs.h>
// include ordering tags
#include "order_tags.h"
BEGIN_NAMESPACE_PBORI
template <class OrderTag>
struct order_traits_code;
template <>
struct order_traits_code<lex_tag> { enum {order_code = CTypes::lp}; };
template <>
struct order_traits_code<dlex_tag> { enum {order_code = CTypes::dlex}; };
template <>
struct order_traits_code<dp_asc_tag> { enum {order_code = CTypes::dp_asc}; };
template <>
struct order_traits_code<block_dlex_tag> { enum {order_code = CTypes::block_dlex}; };
template <>
struct order_traits_code<block_dp_asc_tag> { enum {order_code = CTypes::block_dp_asc}; };
template <class OrderTag>
class order_traits;
template <class BaseOrderTag>
class order_traits<block_tag<BaseOrderTag> > {
public:
enum { order_code = order_traits_code<block_tag<BaseOrderTag> >::order_code,
baseorder_code = order_traits_code<BaseOrderTag>::order_code };
};
template <class OrderTag>
class order_traits {
public:
enum { order_code = order_traits_code<OrderTag>::order_code,
baseorder_code = order_code };
};
END_NAMESPACE_PBORI
#endif // order_traits_h_
END_NAMESPACE_PBORI
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
BEGIN_NAMESPACE_PBORI
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
polybori::order_traits
Definition: order_traits.h:41
polybori::dlex_tag
Marker for deg-lex ordering.
Definition: order_tags.h:32
polybori::dlex
Definition: embed.h:58
polybori::lex_tag
Marker for lex ordering.
Definition: order_tags.h:27
order_tags.h
polybori::order_traits_code
Definition: order_traits.h:27
pbori_defs.h
polybori::lp
Definition: embed.h:57
polybori::dp_asc
Definition: embed.h:59
polybori::block_dlex
Definition: embed.h:60
polybori::dp_asc_tag
Marker for ascending deg-rev-lex ordering.
Definition: order_tags.h:37
polybori::block_tag
Marker for block orderings.
Definition: order_tags.h:43
polybori::block_dp_asc
Definition: embed.h:61