|
definie ==, !=, <, >, <=, >=.
|
| template<typename U1 , typename U2 > |
| constexpr auto | operator== (const ManhattanArc< U1, U2 > &rhs) const -> bool |
| | Compares two ManhattanArc objects for equality.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | operator!= (const ManhattanArc< U1, U2 > &rhs) const -> bool |
| | Not equal to.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | overlaps (const ManhattanArc< U1, U2 > &other) const -> bool |
| | Check if two ManhattanArc objects overlap.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | intersect_with (const ManhattanArc< U1, U2 > &other) const |
| | Compute the intersection of two ManhattanArc objects.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | min_dist_with (const ManhattanArc< U1, U2 > &other) const |
| | Compute the minimum distance between the x and y coordinates of two ManhattanArc objects.
|
| |
| template<typename R > |
| constexpr auto | enlarge_with (const R &alpha) const |
| | Enlarge the ManhattanArc object by a given scale factor.
|
| |
| constexpr auto | get_center () const |
| | Calculate the center of the ManhattanArc.
|
| |
| constexpr auto | get_lower_corner () const |
| | Calculate the lower corner of the ManhattanArc.
|
| |
| constexpr auto | get_upper_corner () const |
| | Calculate the upper corner of the ManhattanArc.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | nearest_point_to (const Point< U1, U2 > &other) const |
| | Find the nearest point to a given Point.
|
| |
| template<typename U1 , typename U2 > |
| constexpr auto | merge_with (const ManhattanArc< U1, U2 > &other, int alpha) const |
| | Merge with another ManhattanArc using a given alpha.
|
| |
| template<class Stream > |
| auto | operator<< (Stream &out, const ManhattanArc &manhattan_arc) -> Stream & |
| | Overload the stream insertion operator << to output a ManhattanArc object.
|
| |
template<typename T1, typename T2 = T1>
class recti::ManhattanArc< T1, T2 >
Merging Object (for deferred-merge embedding (DME) algorithm)
The code is defining a class template called ManhattanArc that represents a merging segment. The merging segment can include a single point, segment, or region. The template has two type parameters T1 and T2, which default to int if not specified. The class inherits from the Point class, which represents a point in a 2D coordinate system. The ManhattanArc class provides various operations and functions for manipulating and comparing merging segments, such as adding and subtracting vectors, checking for overlap and intersection with other merging segments, calculating the minimum distance between merging segments, and merging two merging segments. The class also provides comparison operators and a stream insertion operator for convenient usage. The purpose of the ManhattanArc class is to support the deferred-merge embedding (DME) algorithm, as referenced in the code comments.
Reference:
- Ting-Hai Chao, Yu-Chin Hsu, Jan-Ming Ho and A. B. Kahng, "Zero skew clock
routing with minimum wirelength," in IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, vol. 39, no. 11, pp. 799-814, Nov. 1992, doi: 10.1109/82.204128.
- Template Parameters
-
template<typename T1 , typename T2 = T1>
Construct a new ManhattanArc object.
This code defines a constructor for the ManhattanArc class template. The constructor takes two parameters xcoord and ycoord, which are of type T1 and T2 respectively. The constructor is marked as constexpr and noexcept, indicating that it can be evaluated at compile-time and it does not throw any exceptions.
- Parameters
-
| [in] | xcoord | The x coordinate value. |
| [in] | ycoord | The y coordinate value. |
template<typename T1 , typename T2 = T1>
template<typename U1 , typename U2 >
Compute the minimum distance between the x and y coordinates of two ManhattanArc objects.
This function calculates the maximum distance between the x and y coordinates of the current ManhattanArc object and the provided ManhattanArc object other. The distance is computed by taking the maximum of the distances between the x coordinates and the distances between the y coordinates of the two ManhattanArc objects.
- Template Parameters
-
| U1 | The type of the x and y coordinates of the current ManhattanArc object. |
| U2 | The type of the x and y coordinates of the ManhattanArc object other. |
- Parameters
-
| [in] | other | The ManhattanArc object to compute the maximum distance with. |
- Returns
- The maximum distance between the two
ManhattanArc objects.
template<typename T1 , typename T2 = T1>
template<typename U1 , typename U2 >
Not equal to.
Compares two ManhattanArc objects for inequality.
This operator overload compares two ManhattanArc objects for inequality. It returns true if the underlying Point<T1, T2> objects are not equal, and false otherwise.
- Template Parameters
-
| U1 | The type of the x-coordinate of the right-hand side ManhattanArc. |
| U2 | The type of the y-coordinate of the right-hand side ManhattanArc. |
- Parameters
-
- Returns
true if the two ManhattanArc objects are not equal, false otherwise.
template<typename T1 , typename T2 = T1>
template<typename U1 , typename U2 >
Compares two ManhattanArc objects for equality.
This operator overload compares two ManhattanArc objects for equality. It returns true if the underlying Point<T1, T2> objects are equal, and false otherwise.
- Template Parameters
-
| U1 | The type of the x-coordinate of the right-hand side ManhattanArc. |
| U2 | The type of the y-coordinate of the right-hand side ManhattanArc. |
- Parameters
-
- Returns
true if the two ManhattanArc objects are equal, false otherwise.
template<typename T1 , typename T2 = T1>
template<typename U1 , typename U2 >
Check if two ManhattanArc objects overlap.
This function checks if the x and y coordinates of the current ManhattanArc object overlap with the x and y coordinates of the provided ManhattanArc object other. The overlap is determined by checking if the ranges of the x and y coordinates intersect.
- Template Parameters
-
| U1 | The type of the x and y coordinates of the current ManhattanArc object. |
| U2 | The type of the x and y coordinates of the ManhattanArc object other. |
- Parameters
-
- Returns
true if the two ManhattanArc objects overlap, false otherwise.
template<typename T1 , typename T2 = T1>
template<class Stream >
| auto operator<< |
( |
Stream & |
out, |
|
|
const ManhattanArc< T1, T2 > & |
manhattan_arc |
|
) |
| -> Stream& |
|
friend |
Overload the stream insertion operator << to output a ManhattanArc object.
This function overloads the stream insertion operator << to output a ManhattanArc object in the format "/{xcoord}, {ycoord}/", where {xcoord} and {ycoord} are the x and y coordinates of the ManhattanArc object, respectively.
- Template Parameters
-
| Stream | The type of the output stream. |
- Parameters
-
| [out] | out | The output stream to write the ManhattanArc object to. |
| [in] | manhattan_arc | The ManhattanArc object to be written to the output stream. |
- Returns
- The modified output stream.