Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PackingRowInfo.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
35 
36 namespace ogdf {
37 namespace energybased {
38 namespace fmmm {
39 
42 {
44  friend ostream &operator<< (ostream & output, const PackingRowInfo & A)
45  {
46  output <<" max_height "<<A.max_height<<" total_width "<<A.total_width<<" row_index "
47  << A.row_index;
48  return output;
49  }
50 
52  friend istream &operator>> (istream & input, PackingRowInfo & A)
53  {
54  input >>A.max_height>>A.total_width>>A.row_index;
55  return input;
56  }
57 
58 public:
59 
61  {
62  total_width = 0;
63  max_height = 0;
64  row_index = 0;
65  }
66 
68 
69  void set_max_height(double h) { max_height = h; }
70  void set_total_width(double w) { total_width = w; }
71  void set_row_index(int i) { row_index = i; }
72 
73  double get_max_height() { return max_height; }
74  double get_total_width() { return total_width; }
75  int get_row_index() { return row_index; }
76 
77 private:
78  double max_height;
79  double total_width;
80  int row_index;
81 };
82 
83 }
84 }
85 }
double max_height
the maximum height of a rectangle placed in this row
double total_width
the sum of the width of all rectsngles in this row
Helping data structure for MAARPacking.
int row_index
the index of the row (first row in packing has index 0)
friend istream & operator>>(istream &input, PackingRowInfo &A)
Inputstream for PackingRowInfo.
Basic declarations, included by all source files.
friend ostream & operator<<(ostream &output, const PackingRowInfo &A)
Outputstream for PackingRowInfo.
The namespace for all OGDF objects.