Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

edge.h

Go to the documentation of this file.
00001 /*
00002         Copyright (C) 1997 CFU Corporation
00003 
00004         Author: Chao-yinig Fu
00005         Date: Oct. 29 1997
00006 
00007         ^..^
00008         (00)
00009 
00010          $__$
00011         <~00~>
00012          (oo)
00013           ||
00014 
00015         ```````
00016         C ^|^ D
00017          \ O /
00018 */
00019 
00020 #ifndef INCLUDED_EDGE_H
00021 #define INCLUDED_EDGE_H
00022 
00023 class Edge
00024 {
00025 public:
00026         Edge():_counter_index(-1),_edge_id(0),_weight(-1),_profile(1),_num_paths(0),_eff_sum(0),_entry_to_sink_edge_id(-1),_source_to_exit_edge_id(-1) {}
00027 
00028         ~Edge()
00029         {
00030         }
00031 
00032         int counter_index() {return _counter_index;}
00033         int edge_id() {return _edge_id;}
00034         int weight() {return _weight;}
00035         int profile() {return _profile;}
00036         int num_paths() {return _num_paths;}
00037         int eff_sum() {return _eff_sum;}
00038         int entry_to_sink_edge_id() {return _entry_to_sink_edge_id;}
00039         int source_to_exit_edge_id() {return _source_to_exit_edge_id;}
00040 
00041         void set_counter_index(int i) {_counter_index=i;}
00042         void set_edge_id(int i) {_edge_id=i;}
00043         void set_weight(int i) {_weight=i;}
00044         void set_profile(int i) {_profile=i;}
00045         void set_num_paths(int i) {_num_paths=i;}
00046         void set_eff_sum(int i) {_eff_sum=i;}
00047         void set_entry_to_sink_edge_id(int i) {_entry_to_sink_edge_id=i;}
00048         void set_source_to_exit_edge_id(int i) {_source_to_exit_edge_id=i;}
00049 
00050 private:
00051         int _edge_id;
00052         int _weight;    // edge weight
00053         int _profile;   // 0=we don't measure it, 1=we measure it.
00054 
00055         //
00056         // Edge profilinig
00057         //
00058         int _counter_index;     // the index of counter
00059 
00060         //
00061         // Path profiling
00062         //
00063         int _num_paths;
00064         int _eff_sum;
00065 
00066         //
00067         // For ET_BACK type, record two new edges
00068         //
00069         int _entry_to_sink_edge_id;
00070         int _source_to_exit_edge_id;
00071 };
00072 
00073 #endif //INCLUDED_EDGE_H

Generated on Mon Jul 21 20:24:10 2003 for TINKER LEGO DOC by doxygen 1.3.2