-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFF_pair.h
17 lines (17 loc) · 1.17 KB
/
FF_pair.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef FF_PAIR_H
#define FF_PAIR_H
template<typename first_typename,typename second_typename>
struct FF_pair{
first_typename first;
second_typename second;
FF_pair(){}
FF_pair(const first_typename& init_first,const second_typename& init_second){first=init_first;second=init_second;}
FF_pair(const FF_pair& other_value){first=other_value.first;second=other_value.second;};
bool operator==(const FF_pair& other_value)const{return first==other_value.first&&second==other_value.second;}
bool operator!=(const FF_pair& other_value)const{return first!=other_value.first||second!=other_value.second;}
bool operator>(const FF_pair& other_value)const{return first>other_value.first||(first==other_value.first&&second>other_value.second);}
bool operator<(const FF_pair& other_value)const{return first<other_value.first||(first==other_value.first&&second<other_value.second);}
bool operator>=(const FF_pair& other_value)const{return first>other_value.first||(first==other_value.first&&second>=other_value.second);}
bool operator<=(const FF_pair& other_value)const{return first<other_value.first||(first==other_value.first&&second<=other_value.second);}
};
#endif