Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::data::Rect Struct Reference

Detailed Description

a very simple Rectangle structure, with integer boundaries.

Left and top boundaries are inclusive. Right and bottom boundaries are exclusive.

(Note: we do not use QRect because it is often unclear whether boundaries are inclusive or exclusive).

Definition at line 35 of file types.h.

#include <types.h>

Public Member Functions

 Rect ()
 empty constructor; creates an undefined rectangle More...
 
 Rect (int a, int b, int c, int d)
 constructor with bounds More...
 
bool operator== (const Rect &that) const
 equality comparator More...
 
int width () const
 
int height () const
 

Public Attributes

int i0
 left bound, inclusive More...
 
int j0
 top bound, inclusive More...
 
int i1
 right bound, exclusive More...
 
int j1
 top bound, exclusive More...
 

Constructor & Destructor Documentation

◆ Rect() [1/2]

frechet::data::Rect::Rect ( )
inline

empty constructor; creates an undefined rectangle

Definition at line 42 of file types.h.

◆ Rect() [2/2]

frechet::data::Rect::Rect ( int  a,
int  b,
int  c,
int  d 
)
inline

constructor with bounds

Parameters
aleft bound, inclusive
btop bound, inclusive
cright bound, exclusive
dtop bound, exclusive

Definition at line 50 of file types.h.

Member Function Documentation

◆ height()

int frechet::data::Rect::height ( ) const
inline
Returns
height of the rectangle

Definition at line 67 of file types.h.

◆ operator==()

bool frechet::data::Rect::operator== ( const Rect that) const
inline

equality comparator

Parameters
thatanother rectangle
Returns
true if both rectangles are equal

Definition at line 57 of file types.h.

◆ width()

int frechet::data::Rect::width ( ) const
inline
Returns
width of the rectangle

Definition at line 63 of file types.h.

Member Data Documentation

◆ i0

int frechet::data::Rect::i0

left bound, inclusive

Definition at line 36 of file types.h.

◆ i1

int frechet::data::Rect::i1

right bound, exclusive

Definition at line 38 of file types.h.

◆ j0

int frechet::data::Rect::j0

top bound, inclusive

Definition at line 37 of file types.h.

◆ j1

int frechet::data::Rect::j1

top bound, exclusive

Definition at line 39 of file types.h.


The documentation for this struct was generated from the following file: