PreCEntry.cpp
Go to the documentation of this file.
00001 // written by png shao wei
00002 
00003 #include "PreCEntry.h"
00004 
00005 PreCEntry::PreCEntry(int f, int s, double t) {
00006     first = f;
00007     second = s;
00008     third = t;
00009 }
00010 
00011 void PreCEntry::putCEntry(int f, int s, double t) {
00012     first = f;
00013     second = s;
00014     third = t;
00015 }
00016 
00017 bool PreCEntry::operator<(const PreCEntry &rhs) const {
00018 
00019     // 0 2 1 < 1 3 1
00020     // 2 8 1 < 3 8 1
00021     // 2 0 1 < 3 1 1
00022 
00023     if (second < rhs.second)
00024         return 1;
00025     else if (second > rhs.second)
00026         return 0;
00027     else if (first < rhs.first)
00028         return 1;
00029     else
00030         return 0;
00031 }
00032 
00033 bool PreCEntry::operator==(const PreCEntry &rhs) const {
00034 
00035     if ((first == rhs.first) && (second == rhs.second) && (third == rhs.third))
00036         return 1;
00037     else
00038         return 0;
00039 }


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29