File: Properties.h

package info (click to toggle)
abyss 2.3.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,284 kB
  • sloc: cpp: 78,182; ansic: 6,512; makefile: 2,252; perl: 672; sh: 509; haskell: 412; python: 4
file content (84 lines) | stat: -rw-r--r-- 2,119 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef GRAPH_PROPERTIES_H
#define GRAPH_PROPERTIES_H 1

#include <istream>
#include <ostream>
#include <boost/graph/properties.hpp>

/** The distance between two vertices. */
enum edge_distance_t { edge_distance };

/** The complementary vertex of a skew-symmetric graph. */
enum vertex_complement_t { vertex_complement };

/** The index of a contig. */
enum vertex_contig_index_t { vertex_contig_index };

/** The name of a contig without an orientation. */
enum vertex_contig_name_t { vertex_contig_name };

/** The coverage of a vertex. */
enum vertex_coverage_t { vertex_coverage };

/** The length of a vertex. */
enum vertex_length_t { vertex_length };

/** A property indicating that this vertex has been removed. */
enum vertex_removed_t { vertex_removed };

/** The orientation of a vertex. */
enum vertex_sense_t { vertex_sense };

using boost::edge_bundle;
using boost::edge_bundle_t;
using boost::edge_name;
using boost::edge_name_t;
using boost::edge_weight;
using boost::edge_weight_t;
using boost::no_property;
using boost::vertex_bundle;
using boost::vertex_bundle_t;
using boost::vertex_index;
using boost::vertex_index_t;
using boost::vertex_name;
using boost::vertex_name_t;

using boost::edge_bundle_type;
using boost::edge_property;
using boost::vertex_bundle_type;
using boost::vertex_property;

namespace boost {
	BOOST_INSTALL_PROPERTY(edge, distance);
	BOOST_INSTALL_PROPERTY(vertex, complement);
	BOOST_INSTALL_PROPERTY(vertex, contig_index);
	BOOST_INSTALL_PROPERTY(vertex, contig_name);
	BOOST_INSTALL_PROPERTY(vertex, coverage);
	BOOST_INSTALL_PROPERTY(vertex, length);
	BOOST_INSTALL_PROPERTY(vertex, removed);
	BOOST_INSTALL_PROPERTY(vertex, sense);
}

/** No property. */
struct NoProperty
{
	NoProperty(...) { }
	bool operator==(const NoProperty&) const { return true; }
	bool operator!=(const NoProperty&) const { return false; }
	friend std::ostream& operator<<(std::ostream& out,
			const NoProperty&)
	{
		return out;
	}
	friend std::istream& operator>>(std::istream& in, NoProperty&)
	{
		return in;
	}
};

template <typename Tag>
void put(Tag, NoProperty&, unsigned)
{
}

#endif