libabigail
|
The abstraction of the Snake concept, from the paper. More...
#include <abg-diff-utils.h>
Public Member Functions | |
snake () | |
Default constructor for snake. More... | |
snake (const point &b, const point &i, const point &d, const point &e) | |
Constructor from the beginning, intermediate and end points. More... | |
snake (const point &b, const point &i, const point &e) | |
Constructor from the beginning, intermediate and end points. More... | |
void | add (int x_offset, int y_offset) |
Add an offset to the abscissas of the points of the snake, and add another offset to the ordinates of these same points. More... | |
const point & | begin () const |
Getter for the starting point of the non-diagonal edge of the snake. More... | |
void | begin (const point &p) |
Getter for the starting point of the non-diagonal edge of the snake, aka begin point. More... | |
const point & | diagonal_start () const |
Getter for the end point of the first diagonal edge, aka diagonal start point. Note that if the snake has no diagonal edge, this point is empty. More... | |
void | diagonal_start (const point &p) |
Setter for the end point of the first diagonal edge, aka diagonal start point. More... | |
const point & | end () const |
Getter for the end point of the last diagonal edge, aka snake end point. Note that if the snake has no diagonal edge, this point is equal to the intermediate point. More... | |
void | end (const point &p) |
Setter for the end point of the last diagonal edge, aka snake end point. Note that if the snake has no diagonal edge, this point is equal to the intermediate point. More... | |
bool | has_diagonal_edge () const |
bool | has_horizontal_edge () const |
bool | has_vertical_edge () const |
const point & | intermediate () const |
Getter for the end point of the non-diagonal edge of the snake. More... | |
void | intermediate (const point &p) |
Setter for the end point of the non-diagonal edge of the snake, aka intermediate point. More... | |
bool | is_empty () const |
bool | is_forward () const |
void | set (const point &b, const point &i, const point &d, const point &e) |
Setter for the begin, intermediate, diagonal start and end points of the snake. More... | |
void | set (const point &b, const point &i, const point &e) |
Setter for the begin, intermediate and end points of the snake. More... | |
void | set_forward (bool f) |
Set to true if the snake is a forward snake; that is, if it was built while walking the edit graph going forward (from the top left corner to the right bottom corner. Set to false otherwise. More... | |
The abstraction of the Snake concept, from the paper.
In a given path from the edit graph, a snake is a non-diagonal edge followed by zero or more diagonal edges.
The starting poing of the non-diagonal edge is the beginning of the snake. This is given by the snake::begin() method. This point is not explicitely referenced in the paper, but we need it for some grunt implementation details of the algorithm.
The end point of the non-diagonal edge is the intermediate point of the snake; it's given by the snake::intermediate() method. This point is what is referred to as "the begining of the snake" in the paper.
The end point of the first diagonal edge is given by the snake::diagonal_start() method.
The end point of the last diagonal edge is given by the snake::end() method. Note that when the snake contains no diagonal edge, snake::intermediate(), and snake::end() return the same point; snake::diagonal_start() contains an empty point (i.e, a point for which point::is_empty() returns true).
Definition at line 243 of file abg-diff-utils.h.
|
inline |
Default constructor for snake.
Definition at line 251 of file abg-diff-utils.h.
Constructor from the beginning, intermediate and end points.
b | the beginning point of the snake. That is, the starting point of the non-diagonal edge. |
i | the intermediate point of the snake. That is, the end point of the non-diagonal edge. |
e | the end point of the snake. That is the end point of the last diagonal edge. |
Definition at line 265 of file abg-diff-utils.h.
Constructor from the beginning, intermediate and end points.
b | the beginning point of the snake. That is, the starting point of the non-diagonal edge. |
i | the intermediate point of the snake. That is, the end point of the non-diagonal edge. |
d | the beginning of the diagonal edge. That is the end of the first diagonal edge of the snake. |
e | the end point of the snake. That is the end point of the last diagonal edge. |
Definition at line 285 of file abg-diff-utils.h.
|
inline |
Add an offset to the abscissas of the points of the snake, and add another offset to the ordinates of these same points.
x_offset | the offset to add to the abscissas of all the points of the snake. |
y_offset | the offset to add to the ordinates of all the points of the snake. |
Definition at line 417 of file abg-diff-utils.h.
|
inline |
Getter for the starting point of the non-diagonal edge of the snake.
Definition at line 299 of file abg-diff-utils.h.
|
inline |
Getter for the starting point of the non-diagonal edge of the snake, aka begin point.
p | the new begin point. |
Definition at line 307 of file abg-diff-utils.h.
|
inline |
Getter for the end point of the first diagonal edge, aka diagonal start point. Note that if the snake has no diagonal edge, this point is empty.
Definition at line 331 of file abg-diff-utils.h.
|
inline |
Setter for the end point of the first diagonal edge, aka diagonal start point.
p | the new diagonal start.d |
Definition at line 339 of file abg-diff-utils.h.
|
inline |
Getter for the end point of the last diagonal edge, aka snake end point. Note that if the snake has no diagonal edge, this point is equal to the intermediate point.
Definition at line 348 of file abg-diff-utils.h.
|
inline |
Setter for the end point of the last diagonal edge, aka snake end point. Note that if the snake has no diagonal edge, this point is equal to the intermediate point.
Definition at line 355 of file abg-diff-utils.h.
|
inline |
Definition at line 431 of file abg-diff-utils.h.
|
inline |
Definition at line 436 of file abg-diff-utils.h.
|
inline |
Definition at line 441 of file abg-diff-utils.h.
|
inline |
Getter for the end point of the non-diagonal edge of the snake.
Definition at line 314 of file abg-diff-utils.h.
|
inline |
Setter for the end point of the non-diagonal edge of the snake, aka intermediate point.
p | the new intermediate point. |
Definition at line 322 of file abg-diff-utils.h.
|
inline |
Definition at line 446 of file abg-diff-utils.h.
|
inline |
Definition at line 396 of file abg-diff-utils.h.
Setter for the begin, intermediate, diagonal start and end points of the snake.
b | the new snake begin point |
i | the new snake intermediate point |
d | the new diagonal start point |
e | the new snake end point |
Definition at line 384 of file abg-diff-utils.h.
Setter for the begin, intermediate and end points of the snake.
b | the new snake begin point |
i | the new snake intermediate point |
e | the new snake end point |
Definition at line 366 of file abg-diff-utils.h.
|
inline |
Set to true if the snake is a forward snake; that is, if it was built while walking the edit graph going forward (from the top left corner to the right bottom corner. Set to false otherwise.
f | whether the snake is a forward snake or not. |
Definition at line 405 of file abg-diff-utils.h.