Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
hypergraph.cpp
Go to the documentation of this file.
6#include <string>
7
8using namespace ogdf;
9
10int main()
11{
13
14 H.readBenchHypergraph("c17.bench");
15
16 HypergraphAttributesES HA(H, EdgeStandardType::tree);
18
19 hlES.setProfile(HypergraphLayoutES::Profile::Normal);
20 hlES.call(HA);
21
22 GraphIO::write(HA.repGA(), "output-c17.gml", GraphIO::writeGML);
23 GraphIO::write(HA.repGA(), "output-c17.svg", GraphIO::drawSVG);
24
25 return 0;
26}
A declaration of EdgeStandardRep class representing a graph representation of a hypergraph in the edg...
Declares class GraphIO which provides access to all graph read and write functionality.
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
Declares HypergraphAttributes storing specific attributes related to hypergraph layout drawings.
Layout algorithms for hypergraph based on edge standard representations (clique / star / tree) - Hype...
static bool write(const Graph &G, const string &filename, WriterFunc writer=nullptr)
Writes graph G to a file with name filename and infers the format to use from the file's extension.
static bool writeGML(const Graph &G, std::ostream &os)
Writes graph G in GML format to output stream os.
static bool drawSVG(const GraphAttributes &A, std::ostream &os, const SVGSettings &settings)
Stores additional attributes of edge standard representation of a hypergraph.
const GraphAttributes & repGA() const
void readBenchHypergraph(std::istream &is)
Reads hypergraph in bench format from the input stream.
void setProfile(Profile pProfile)
Sets the layout profile.
virtual void call(HypergraphAttributes &HA) override
Computes a layout of hypergraph given by HA.
int main()
The namespace for all OGDF objects.