Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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 std::ostream &operator<< (std::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 std::istream &operator>> (std::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 
67  void set_max_height(double h) { max_height = h; }
68  void set_total_width(double w) { total_width = w; }
69  void set_row_index(int i) { row_index = i; }
70 
71  double get_max_height() { return max_height; }
72  double get_total_width() { return total_width; }
73  int get_row_index() { return row_index; }
74 
75 private:
76  double max_height;
77  double total_width;
78  int row_index;
79 };
80 
81 }
82 }
83 }
double max_height
the maximum height of a rectangle placed in this row
friend std::istream & operator>>(std::istream &input, PackingRowInfo &A)
Inputstream for PackingRowInfo.
friend std::ostream & operator<<(std::ostream &output, const PackingRowInfo &A)
Outputstream for PackingRowInfo.
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)
Basic declarations, included by all source files.
The namespace for all OGDF objects.