DCEdge< T > Class Template Reference

#include <DCEdge.h>

List of all members.

Public Member Functions

 DCEdge ()
 DCEdge (DCVertex< T > *Vert, DCEdge< T > *nextEdge, float m, float xm, float ym, float wm, float wxm, float wym)
virtual ~DCEdge ()
DCVertex< T > * GetEnd ()
DCEdge< T > * GetNext ()
float GetMetric () const
float GetXMetric () const
float GetYMetric () const
float GetWeighMetric () const
float GetXWeighMetric () const
float GetYWeighMetric () const
virtual void Print (Option_t *option="") const
void DrawThisEdge (DCVertex< T > *vert, Option_t *option="")

Private Attributes

float metric
float xmetric
float ymetric
float wmetric
float xwmetric
float ywmetric
DCVertex< T > * end
DCEdge< T > * next

Detailed Description

template<class T>
class DCEdge< T >

Definition at line 15 of file DCEdge.h.


Constructor & Destructor Documentation

template<class T>
DCEdge< T >::DCEdge (  )  [inline]

Definition at line 18 of file DCEdge.h.

References DCEdge< T >::end, DCEdge< T >::metric, and DCEdge< T >::next.

00018 {metric=0;end=0;next=0;}

template<class T>
DCEdge< T >::DCEdge ( DCVertex< T > *  Vert,
DCEdge< T > *  nextEdge,
float  m,
float  xm,
float  ym,
float  wm,
float  wxm,
float  wym 
) [inline]
template<class T>
virtual DCEdge< T >::~DCEdge (  )  [inline, virtual]

Definition at line 25 of file DCEdge.h.

References DCEdge< T >::next.

00025 {delete next;}


Member Function Documentation

template<class T >
void DCEdge< T >::DrawThisEdge ( DCVertex< T > *  vert,
Option_t *  option = "" 
) [inline]

Definition at line 68 of file DCEdge.h.

References DCEdge< T >::end, DCVertex< T >::GetData(), DCEdge< T >::metric, and DCEdge< T >::next.

00069 {
00070 //   cout<<"in DCEdge::DrawThisEdge"<<endl;
00071 //   cout<<"Drawing Edge from ";
00072 //   vert->Print();
00073 //   cout<<" to ";
00074 //   end->Print();
00075 //   cout<<endl;
00076    end->GetData()->Draw();
00077 
00078    float x1=0.;
00079    float y1=0.;
00080    float z1=0.;
00081    vert->GetData()->GetData(x1,y1,z1);
00082    
00083    float x2=0.;
00084    float y2=0.;
00085    float z2=0.;
00086    end->GetData()->GetData(x2,y2,z2);
00087    TLine *l = new TLine(x1,y1,x2,y2);
00088    l->Draw();
00089 
00090    float xtext = (x1+x2)/2.;
00091    float ytext = (y1+y2)/2.;
00092    char dist[10];
00093    sprintf(dist,"d=%.1f",metric);
00094    TText *txt = new TText();
00095    txt->SetTextSize(.02);
00096    txt->DrawText(xtext,ytext,dist);
00097 
00098    if(next!=0){
00099 //      cout<<"going on to next edge"<<endl;
00100       next->DrawThisEdge(vert,t); 
00101    }
00102 
00103 }

template<class T>
DCVertex<T>* DCEdge< T >::GetEnd (  )  [inline]

Definition at line 27 of file DCEdge.h.

References DCEdge< T >::end.

Referenced by MSTCalcAna::GraphLoop().

00027 {return end;}

template<class T>
float DCEdge< T >::GetMetric (  )  const [inline]

Definition at line 29 of file DCEdge.h.

References DCEdge< T >::metric.

Referenced by DCVertex< T >::ConnectTo(), DCGraph< T >::GetAllWeights(), and MSTCalcAna::GraphLoop().

00029 {return metric;}

template<class T>
DCEdge<T>* DCEdge< T >::GetNext (  )  [inline]

Definition at line 28 of file DCEdge.h.

References DCEdge< T >::next.

Referenced by DCGraph< T >::GetAllWeights(), and MSTCalcAna::GraphLoop().

00028 {return next;}

template<class T>
float DCEdge< T >::GetWeighMetric (  )  const [inline]

Definition at line 33 of file DCEdge.h.

References DCEdge< T >::wmetric.

00033 {return wmetric;}

template<class T>
float DCEdge< T >::GetXMetric (  )  const [inline]

Definition at line 30 of file DCEdge.h.

References DCEdge< T >::xmetric.

00030 {return xmetric;}

template<class T>
float DCEdge< T >::GetXWeighMetric (  )  const [inline]

Definition at line 34 of file DCEdge.h.

References DCEdge< T >::xwmetric.

00034 {return xwmetric;}

template<class T>
float DCEdge< T >::GetYMetric (  )  const [inline]

Definition at line 31 of file DCEdge.h.

References DCEdge< T >::ymetric.

00031 {return ymetric;}

template<class T>
float DCEdge< T >::GetYWeighMetric (  )  const [inline]

Definition at line 35 of file DCEdge.h.

References DCEdge< T >::ywmetric.

00035 {return ywmetric;}

template<class T>
virtual void DCEdge< T >::Print ( Option_t *  option = ""  )  const [virtual]

Member Data Documentation

template<class T>
DCVertex<T>* DCEdge< T >::end [private]

Definition at line 48 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), DCEdge< T >::DrawThisEdge(), and DCEdge< T >::GetEnd().

template<class T>
float DCEdge< T >::metric [private]

Definition at line 41 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), DCEdge< T >::DrawThisEdge(), and DCEdge< T >::GetMetric().

template<class T>
DCEdge<T>* DCEdge< T >::next [private]
template<class T>
float DCEdge< T >::wmetric [private]

Definition at line 44 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), and DCEdge< T >::GetWeighMetric().

template<class T>
float DCEdge< T >::xmetric [private]

Definition at line 42 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), and DCEdge< T >::GetXMetric().

template<class T>
float DCEdge< T >::xwmetric [private]

Definition at line 45 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), and DCEdge< T >::GetXWeighMetric().

template<class T>
float DCEdge< T >::ymetric [private]

Definition at line 43 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), and DCEdge< T >::GetYMetric().

template<class T>
float DCEdge< T >::ywmetric [private]

Definition at line 46 of file DCEdge.h.

Referenced by DCEdge< T >::DCEdge(), and DCEdge< T >::GetYWeighMetric().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1