SNAP Library 2.0, Developer Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TMom Class Reference

#include <xmath.h>

Collaboration diagram for TMom:

List of all members.

Public Member Functions

 TMom ()
 TMom (const TMom &Mom)
 TMom (const TFltV &_ValV)
 TMom (TSIn &SIn)
void Save (TSOut &SOut) const
TMomoperator= (const TMom &Mom)
bool operator== (const TMom &Mom) const
bool operator< (const TMom &Mom) const
void Def ()
bool IsDef () const
void Add (const TFlt &Val, const TFlt &Wgt=1)
double GetWgt () const
int GetVals () const
TFlt GetVal (const int &ValN) const
bool IsUsable () const
double GetMn () const
double GetMx () const
double GetExtent () const
double GetMean () const
double GetVari () const
double GetSDev () const
double GetSErr () const
double GetMedian () const
double GetQuart1 () const
double GetQuart3 () const
double GetDecile (const int &DecileN) const
double GetPercentile (const int &PercentileN) const
double GetByNm (const TStr &MomNm) const
TStr GetStrByNm (const TStr &MomNm, char *FmtStr=NULL) const
TStr GetStr (const char &SepCh=' ', const char &DelimCh=':', const bool &DecileP=true, const bool &PercentileP=true, const TStr &FmtStr="%g") const
TStr GetValVStr (const char &SepCh='\t', const bool &DecileP=true, const bool &PercentileP=true) const

Static Public Member Functions

static PMom New ()
static void NewV (TMomV &MomV, const int &Moms)
static void NewVV (TVVec< PMom > &MomVV, const int &XMoms, const int &YMoms)
static PMom New (const TFltV &ValV)
static PMom Load (TSIn &SIn)
static void DefV (TMomV &MomV)
static void DefVV (TVVec< PMom > &MomVV)
static bool IsUsableV (const TMomV &MomV)
static bool IsUsableVV (const TVVec< PMom > &MomVV)
static TStr GetNmVStr (const TStr &VarPfx, const char &SepCh='\t', const bool &DecileP=true, const bool &PercentileP=true)

Private Attributes

TCRef CRef
TBool DefP
TFltPrV ValWgtV
TFlt SumW
TFlt ValSumW
TInt Vals
TBool UsableP
TFlt UnusableVal
TFlt Mn
TFlt Mx
TFlt Mean
TFlt Vari
TFlt SDev
TFlt SErr
TFlt Median
TFlt Quart1
TFlt Quart3
TFltV DecileV
TFltV PercentileV

Friends

class TPt< TMom >

Detailed Description

Definition at line 129 of file xmath.h.


Constructor & Destructor Documentation

TMom::TMom ( ) [inline]

Definition at line 143 of file xmath.h.

        :
    DefP(false), ValWgtV(),
    SumW(), ValSumW(), Vals(),
    UsableP(false), UnusableVal(-1),
    Mn(), Mx(),
    Mean(), Vari(), SDev(), SErr(),
    Median(), Quart1(), Quart3(),
    DecileV(), PercentileV(){}
TMom::TMom ( const TMom Mom) [inline]

Definition at line 151 of file xmath.h.

                       :
    DefP(Mom.DefP), ValWgtV(Mom.ValWgtV),
    SumW(Mom.SumW), ValSumW(Mom.ValSumW), Vals(Mom.Vals),
    UsableP(Mom.UsableP), UnusableVal(Mom.UnusableVal),
    Mn(Mom.Mn), Mx(Mom.Mx),
    Mean(Mom.Mean), Vari(Mom.Vari), SDev(Mom.SDev), SErr(Mom.SErr),
    Median(Mom.Median), Quart1(Mom.Quart1), Quart3(Mom.Quart3),
    DecileV(Mom.DecileV), PercentileV(Mom.PercentileV){}
TMom::TMom ( const TFltV _ValV)

Definition at line 326 of file xmath.cpp.

References Add(), Def(), and TVec< TVal, TSizeTy >::Len().

                            :
  //WgtV(_ValV.Len(), 0), ValV(_ValV.Len(), 0),
  ValWgtV(_ValV.Len(), 0),
  SumW(), ValSumW(),
  UsableP(false), UnusableVal(-1),
  Mn(), Mx(),
  Mean(), Vari(), SDev(), SErr(),
  Median(), Quart1(), Quart3(),
  DecileV(), PercentileV(){
  for (int ValN=0; ValN<_ValV.Len(); ValN++){Add(_ValV[ValN], 1);}
  Def();
}

Here is the call graph for this function:

TMom::TMom ( TSIn SIn) [inline]

Definition at line 170 of file xmath.h.

                 :
    DefP(SIn),
    ValWgtV(SIn),
    SumW(SIn), ValSumW(SIn), Vals(SIn),
    UsableP(SIn), UnusableVal(SIn),
    Mn(SIn), Mx(SIn),
    Mean(SIn), Vari(SIn), SDev(SIn), SErr(SIn),
    Median(SIn), Quart1(SIn), Quart3(SIn),
    DecileV(SIn), PercentileV(SIn){}

Member Function Documentation

void TMom::Add ( const TFlt Val,
const TFlt Wgt = 1 
) [inline]
void TMom::Def ( )

Definition at line 339 of file xmath.cpp.

References TVec< TVal, TSizeTy >::Clr(), DecileV, DefP, TVec< TVal, TSizeTy >::Gen(), IAssert, TVec< TVal, TSizeTy >::Len(), Mean, Median, Mn, TFlt::Mn, Mx, PercentileV, Quart1, Quart3, SDev, SErr, TVec< TVal, TSizeTy >::Sort(), TMath::Sqr(), SumW, UsableP, ValSumW, ValWgtV, and Vari.

Referenced by TGnuPlot::AddPlot(), TGStat::AvgGStat(), TSnap::GetAnfEffDiam(), TLocClustStat::GetCurveStat(), TLocClustStat::TCutInfo::GetFracDegOut(), TTimeNet::PlotEffDiam(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TGnuPlot::PlotValMomH(), TGStat::TakeDiam(), and TMom().

              {
  IAssert(!DefP); DefP=true;
  UsableP=(SumW>0)&&(ValWgtV.Len()>0);
  if (UsableP){
    // Mn, Mx
    Mn=ValWgtV[0].Val1;
    Mx=ValWgtV[0].Val1;
    // Mean, Variance (Mn, Mx), Standard-Error
    Mean=ValSumW/SumW;
    Vari=0;
    if (ValWgtV.Len()>1){
      for (int ValN=0; ValN<ValWgtV.Len(); ValN++){
        const double Val=ValWgtV[ValN].Val1;
        Vari+=ValWgtV[ValN].Val2*TMath::Sqr(Val-Mean);
        if (Val<Mn){Mn=Val;}
        if (Val>Mx){Mx=Val;}
      }
      Vari=Vari/SumW;
      SErr=sqrt(Vari/(ValWgtV.Len()*(ValWgtV.Len()-1)));
    }
    // Standard-Deviation
    SDev=sqrt(double(Vari));
    // Median
    ValWgtV.Sort();
    double CurSumW = 0;
    for (int ValN=0; ValN<ValWgtV.Len(); ValN++){
      CurSumW += ValWgtV[ValN].Val2;
      if (CurSumW > 0.5*SumW) { 
        Median = ValWgtV[ValN].Val1; break; }
      else if (CurSumW == 0.5*SumW) {
        Median = 0.5 * (ValWgtV[ValN].Val1+ValWgtV[ValN+1].Val1); break; }
    }
    // Quartile-1 and Quartile-3
    Quart1=Quart3=TFlt::Mn;
    CurSumW = 0;
    for (int ValN=0; ValN<ValWgtV.Len(); ValN++){
      CurSumW += ValWgtV[ValN].Val2;
      if (Quart1==TFlt::Mn) {
        if (CurSumW > 0.25*SumW) {  Quart1 = ValWgtV[ValN].Val1; }
        //else if (CurSumW == 0.25*SumW) { Quart1 = 0.5 * (ValWgtV[ValN].Val1+ValWgtV[ValN+1].Val1); }
      } 
      if (Quart3==TFlt::Mn) {
        if (CurSumW > 0.75*SumW) { Quart3 = ValWgtV[ValN].Val1; }
        //else if (CurSumW == 0.75*SumW) { Quart3 = 0.5 * (ValWgtV[ValN].Val1+ValWgtV[ValN+1].Val1); }
      }
    }
    // Deciles & Percentiles
    CurSumW = 0;
    int DecileN = 1, PercentileN = 1;
    DecileV.Gen(11);  PercentileV.Gen(101);
    DecileV[0]=Mn; DecileV[10]=Mx;
    PercentileV[0]=Mn; PercentileV[100]=Mx;
    for (int ValN=0; ValN<ValWgtV.Len(); ValN++){
      CurSumW += ValWgtV[ValN].Val2;
      if (CurSumW > SumW*DecileN*0.1) { 
        DecileV[DecileN] = ValWgtV[ValN].Val1;  DecileN++; }
      if (CurSumW > SumW*PercentileN*0.01) {
        PercentileV[PercentileN] = ValWgtV[ValN].Val1;  PercentileN++; }
    }
  }
  ValWgtV.Clr();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void TMom::DefV ( TMomV MomV) [inline, static]

Definition at line 207 of file xmath.h.

References TVec< TVal, TSizeTy >::Len().

                               {
    for (int MomN=0; MomN<MomV.Len(); MomN++){MomV[MomN]->Def();}}

Here is the call graph for this function:

static void TMom::DefVV ( TVVec< PMom > &  MomVV) [inline, static]

Definition at line 209 of file xmath.h.

References TVVec< TVal >::At(), TVVec< TVal >::GetXDim(), and TVVec< TVal >::GetYDim().

                                       {
    for (int XMomN=0; XMomN<MomVV.GetXDim(); XMomN++){
      for (int YMomN=0; YMomN<MomVV.GetYDim(); YMomN++){
        MomVV.At(XMomN, YMomN)->Def();}}}

Here is the call graph for this function:

double TMom::GetByNm ( const TStr MomNm) const

Definition at line 404 of file xmath.cpp.

References Fail, GetDecile(), GetMean(), GetMedian(), GetQuart1(), GetQuart3(), GetSDev(), GetSErr(), and GetVari().

Referenced by GetStrByNm().

                                            {
  if (MomNm=="Mean"){return GetMean();}
  else if (MomNm=="Vari"){return GetVari();}
  else if (MomNm=="SDev"){return GetSDev();}
  else if (MomNm=="SErr"){return GetSErr();}
  else if (MomNm=="Median"){return GetMedian();}
  else if (MomNm=="Quart1"){return GetQuart1();}
  else if (MomNm=="Quart3"){return GetQuart3();}
  else if (MomNm=="Decile0"){return GetDecile(0);}
  else if (MomNm=="Decile1"){return GetDecile(1);}
  else if (MomNm=="Decile2"){return GetDecile(2);}
  else if (MomNm=="Decile3"){return GetDecile(3);}
  else if (MomNm=="Decile4"){return GetDecile(4);}
  else if (MomNm=="Decile5"){return GetDecile(5);}
  else if (MomNm=="Decile6"){return GetDecile(6);}
  else if (MomNm=="Decile7"){return GetDecile(7);}
  else if (MomNm=="Decile8"){return GetDecile(8);}
  else if (MomNm=="Decile9"){return GetDecile(9);}
  else if (MomNm=="Decile10"){return GetDecile(10);}
  else {Fail; return 0;}
}

Here is the call graph for this function:

Here is the caller graph for this function:

double TMom::GetDecile ( const int &  DecileN) const [inline]

Definition at line 246 of file xmath.h.

References Assert.

Referenced by GetByNm(), TLocClustStat::GetCurveStat(), TLocClustStat::TCutInfo::GetFracDegOut(), GetStr(), and GetValVStr().

                                             {
    Assert(DefP&&UsableP); return DecileV[DecileN];}

Here is the caller graph for this function:

double TMom::GetExtent ( ) const [inline]

Definition at line 238 of file xmath.h.

References Assert.

{Assert(DefP&&UsableP); return Mx-Mn;}
double TMom::GetMedian ( ) const [inline]
double TMom::GetMn ( ) const [inline]

Definition at line 236 of file xmath.h.

References Assert.

Referenced by TGnuPlot::AddPlot(), TLocClustStat::GetCurveStat(), GetStr(), GetValVStr(), and TGnuPlot::PlotValMomH().

{Assert(DefP&&UsableP); return Mn;}

Here is the caller graph for this function:

double TMom::GetMx ( ) const [inline]

Definition at line 237 of file xmath.h.

References Assert.

Referenced by TGnuPlot::AddPlot(), TLocClustStat::GetCurveStat(), TLocClustStat::TCutInfo::GetFracDegOut(), GetStr(), GetValVStr(), and TGnuPlot::PlotValMomH().

{Assert(DefP&&UsableP); return Mx;}

Here is the caller graph for this function:

TStr TMom::GetNmVStr ( const TStr VarPfx,
const char &  SepCh = '\t',
const bool &  DecileP = true,
const bool &  PercentileP = true 
) [static]

Definition at line 475 of file xmath.cpp.

References GetStr().

                                                                 {
  TChA ChA;
  ChA+=VarPfx; ChA+="Vals"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Min"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Max"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Mean"; ChA+=SepCh;
  //ChA+=VarPfx; ChA+="Vari"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="SDev"; ChA+=SepCh;
  //ChA+=VarPfx; ChA+="SErr"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Quart1"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Median"; ChA+=SepCh;
  ChA+=VarPfx; ChA+="Quart3";
  if (DecileP){
    ChA+=SepCh;
    for (int DecileN=0; DecileN<=10; DecileN++){
      ChA+=VarPfx; ChA+="Dec"; ChA+=TInt::GetStr(DecileN);
      if (DecileN<10){ChA+=SepCh;}
    }
  }
  if (PercentileP){
    ChA+=SepCh;
    for (int PercentileN=0; PercentileN<=100; PercentileN++){
      ChA+=VarPfx; ChA+="Per"; ChA+=TInt::GetStr(PercentileN);
      if (PercentileN<100){ChA+=SepCh;}
    }
  }
  return ChA;
}

Here is the call graph for this function:

double TMom::GetPercentile ( const int &  PercentileN) const [inline]

Definition at line 248 of file xmath.h.

References Assert.

Referenced by GetStr(), and GetValVStr().

                                                     {
    Assert(DefP&&UsableP); return PercentileV[PercentileN];}

Here is the caller graph for this function:

double TMom::GetQuart1 ( ) const [inline]

Definition at line 244 of file xmath.h.

References Assert.

Referenced by GetByNm(), GetStr(), and GetValVStr().

{Assert(DefP&&UsableP); return Quart1;}

Here is the caller graph for this function:

double TMom::GetQuart3 ( ) const [inline]

Definition at line 245 of file xmath.h.

References Assert.

Referenced by GetByNm(), GetStr(), and GetValVStr().

{Assert(DefP&&UsableP); return Quart3;}

Here is the caller graph for this function:

double TMom::GetSDev ( ) const [inline]

Definition at line 241 of file xmath.h.

References Assert.

Referenced by TGnuPlot::AddPlot(), GetByNm(), GetStr(), GetValVStr(), TTimeNet::PlotEffDiam(), TTimeNet::PlotMissingPast(), TGnuPlot::PlotValMomH(), TGStat::TakeDiam(), and TSnap::TestAnf().

{Assert(DefP&&UsableP); return SDev;}

Here is the caller graph for this function:

double TMom::GetSErr ( ) const [inline]

Definition at line 242 of file xmath.h.

References Assert.

Referenced by GetByNm().

{Assert(DefP&&UsableP); return SErr;}

Here is the caller graph for this function:

TStr TMom::GetStr ( const char &  SepCh = ' ',
const char &  DelimCh = ':',
const bool &  DecileP = true,
const bool &  PercentileP = true,
const TStr FmtStr = "%g" 
) const

Definition at line 438 of file xmath.cpp.

References TStr::CStr(), GetDecile(), GetMean(), GetMedian(), GetMn(), GetMx(), GetPercentile(), GetQuart1(), GetQuart3(), GetSDev(), GetVals(), and IsUsable().

Referenced by GetNmVStr(), GetStrByNm(), and GetValVStr().

                                                                         {
  TChA ChA;
  if (IsUsable()){
    ChA+="["; ChA+=SepCh;
    ChA+="Vals"; ChA+=DelimCh; ChA+=TInt::GetStr(GetVals()); ChA+=SepCh;
    ChA+="Min"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetMn(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="Max"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetMx(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="Mean"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetMean(), FmtStr.CStr()); ChA+=SepCh;
    //ChA+="Vari"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetVari(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="SDev"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetSDev(), FmtStr.CStr()); ChA+=SepCh;
    //ChA+="SErr"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetSErr(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="Quart1"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetQuart1(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="Median"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetMedian(), FmtStr.CStr()); ChA+=SepCh;
    ChA+="Quart3"; ChA+=DelimCh; ChA+=TFlt::GetStr(GetQuart3(), FmtStr.CStr()); ChA+=SepCh;
    if (DecileP){
      for (int DecileN=0; DecileN<=10; DecileN++){
        ChA+="Dec"; ChA+=TInt::GetStr(DecileN);
        ChA+=DelimCh; ChA+=TFlt::GetStr(GetDecile(DecileN), FmtStr.CStr());
        ChA+=SepCh;
      }
    }
    if (PercentileP){
      for (int PercentileN=0; PercentileN<=100; PercentileN++){
        ChA+="Per"; ChA+=TInt::GetStr(PercentileN);
        ChA+=DelimCh; ChA+=TFlt::GetStr(GetPercentile(PercentileN), FmtStr.CStr());
        ChA+=SepCh;
      }
    }
    ChA+="]";
  } else {
    ChA="[Unusable]";
  }
  return ChA;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TMom::GetStrByNm ( const TStr MomNm,
char *  FmtStr = NULL 
) const

Definition at line 426 of file xmath.cpp.

References GetByNm(), GetStr(), and IsUsable().

                                                           {
  if (IsUsable()){
    if (FmtStr==NULL){
      return TFlt::GetStr(GetByNm(MomNm));
    } else {
      return TFlt::GetStr(GetByNm(MomNm), FmtStr);
    }
  } else {
    return "X";
  }
}

Here is the call graph for this function:

TFlt TMom::GetVal ( const int &  ValN) const [inline]

Definition at line 220 of file xmath.h.

References IAssert.

{IAssert(!IsDef()); return ValWgtV[ValN].Val1;}
int TMom::GetVals ( ) const [inline]

Definition at line 219 of file xmath.h.

Referenced by TGnuPlot::AddPlot(), TGStat::AvgGStat(), GetStr(), GetValVStr(), and TGnuPlot::PlotValMomH().

{return Vals;}

Here is the caller graph for this function:

TStr TMom::GetValVStr ( const char &  SepCh = '\t',
const bool &  DecileP = true,
const bool &  PercentileP = true 
) const

Definition at line 505 of file xmath.cpp.

References GetDecile(), GetMean(), GetMedian(), GetMn(), GetMx(), GetPercentile(), GetQuart1(), GetQuart3(), GetSDev(), GetStr(), GetVals(), IsUsable(), and Vals.

                                                                        {
  TChA ChA;
  if (IsUsable()){
    ChA+=TInt::GetStr(GetVals()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetMn()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetMx()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetMean()); ChA+=SepCh;
    //ChA+=TFlt::GetStr(GetVari()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetSDev()); ChA+=SepCh;
    //ChA+=TFlt::GetStr(GetSErr()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetQuart1()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetMedian()); ChA+=SepCh;
    ChA+=TFlt::GetStr(GetQuart3()); ChA+=SepCh;
    if (DecileP){
      for (int DecileN=0; DecileN<=10; DecileN++){
        ChA+=TFlt::GetStr(GetDecile(DecileN)); ChA+=SepCh;
      }
    }
    if (PercentileP){
      for (int PercentileN=0; PercentileN<=100; PercentileN++){
        ChA+=TFlt::GetStr(GetPercentile(PercentileN)); ChA+=SepCh;
      }
    }
  } else {
    int Vals=8;
    if (DecileP){Vals+=11;}
    if (PercentileP){Vals+=101;}
    for (int ValN=0; ValN<Vals; ValN++){
      ChA="[Unusable]";
      if (ValN<Vals-1){ChA+=SepCh;}
    }
  }
  return ChA;
}

Here is the call graph for this function:

double TMom::GetVari ( ) const [inline]

Definition at line 240 of file xmath.h.

References Assert.

Referenced by GetByNm().

{Assert(DefP&&UsableP); return Vari;}

Here is the caller graph for this function:

double TMom::GetWgt ( ) const [inline]

Definition at line 218 of file xmath.h.

{return SumW;}
bool TMom::IsDef ( ) const [inline]

Definition at line 213 of file xmath.h.

Referenced by TGnuPlot::AddPlot(), and TGnuPlot::PlotValMomH().

{return DefP;}

Here is the caller graph for this function:

bool TMom::IsUsable ( ) const [inline]

Definition at line 224 of file xmath.h.

References Assert.

Referenced by TGStat::AvgGStat(), GetStr(), GetStrByNm(), and GetValVStr().

{Assert(DefP); return UsableP;}

Here is the caller graph for this function:

static bool TMom::IsUsableV ( const TMomV MomV) [inline, static]

Definition at line 225 of file xmath.h.

References TVec< TVal, TSizeTy >::Len().

                                          {
    for (int MomN=0; MomN<MomV.Len(); MomN++){
      if (!MomV[MomN]->IsUsable()){return false;}}
    return true;}

Here is the call graph for this function:

static bool TMom::IsUsableVV ( const TVVec< PMom > &  MomVV) [inline, static]

Definition at line 229 of file xmath.h.

References TVVec< TVal >::At(), TVVec< TVal >::GetXDim(), and TVVec< TVal >::GetYDim().

                                                  {
    for (int XMomN=0; XMomN<MomVV.GetXDim(); XMomN++){
      for (int YMomN=0; YMomN<MomVV.GetYDim(); YMomN++){
        if (!MomVV.At(XMomN, YMomN)->IsUsable()){return false;}}}
    return true;}

Here is the call graph for this function:

static PMom TMom::Load ( TSIn SIn) [inline, static]

Definition at line 179 of file xmath.h.

{return new TMom(SIn);}
static PMom TMom::New ( ) [inline, static]

Definition at line 159 of file xmath.h.

Referenced by TStatTest::TTest().

{return PMom(new TMom());}

Here is the caller graph for this function:

static PMom TMom::New ( const TFltV ValV) [inline, static]

Definition at line 168 of file xmath.h.

                                    {
    return PMom(new TMom(ValV));}
static void TMom::NewV ( TMomV MomV,
const int &  Moms 
) [inline, static]

Definition at line 160 of file xmath.h.

References TVec< TVal, TSizeTy >::Gen().

                                                {
    MomV.Gen(Moms); for (int MomN=0; MomN<Moms; MomN++){MomV[MomN]=New();}}

Here is the call graph for this function:

static void TMom::NewVV ( TVVec< PMom > &  MomVV,
const int &  XMoms,
const int &  YMoms 
) [inline, static]

Definition at line 162 of file xmath.h.

References TVVec< TVal >::At(), and TVVec< TVal >::Gen().

                                                                           {
    MomVV.Gen(XMoms, YMoms);
    for (int XMomN=0; XMomN<XMoms; XMomN++){
      for (int YMomN=0; YMomN<YMoms; YMomN++){
        MomVV.At(XMomN, YMomN)=New();}}}

Here is the call graph for this function:

bool TMom::operator< ( const TMom Mom) const [inline]

Definition at line 202 of file xmath.h.

References Vals.

                                        {
    return Vals<Mom.Vals;}
TMom& TMom::operator= ( const TMom Mom) [inline]

Definition at line 190 of file xmath.h.

References Assert, DecileV, DefP, Mean, Median, Mn, Mx, PercentileV, Quart1, Quart3, SDev, SErr, SumW, UnusableVal, UsableP, Vals, ValSumW, ValWgtV, and Vari.

                                  {
    Assert(!DefP); DefP=Mom.DefP;
    ValWgtV=Mom.ValWgtV;
    SumW=Mom.SumW; ValSumW=Mom.ValSumW; Vals=Mom.Vals;
    UsableP=Mom.UsableP; UnusableVal=Mom.UnusableVal;
    Mn=Mom.Mn; Mx=Mom.Mx;
    Mean=Mom.Mean; Vari=Mom.Vari; SDev=Mom.SDev; SErr=Mom.SErr;
    Median=Mom.Median; Quart1=Mom.Quart1; Quart3=Mom.Quart3;
    DecileV=Mom.DecileV; PercentileV=Mom.PercentileV;
    return *this;}
bool TMom::operator== ( const TMom Mom) const [inline]

Definition at line 200 of file xmath.h.

References Vals.

                                         {
    return Vals==Mom.Vals;}
void TMom::Save ( TSOut SOut) const [inline]

Definition at line 180 of file xmath.h.

                               {
    DefP.Save(SOut);
    ValWgtV.Save(SOut);
    SumW.Save(SOut); ValSumW.Save(SOut); Vals.Save(SOut);
    UsableP.Save(SOut); UnusableVal.Save(SOut);
    Mn.Save(SOut); Mx.Save(SOut);
    Mean.Save(SOut); Vari.Save(SOut); SDev.Save(SOut); SErr.Save(SOut);
    Median.Save(SOut); Quart1.Save(SOut); Quart3.Save(SOut);
    DecileV.Save(SOut); PercentileV.Save(SOut);}

Friends And Related Function Documentation

friend class TPt< TMom > [friend]

Definition at line 129 of file xmath.h.


Member Data Documentation

TCRef TMom::CRef [private]

Definition at line 129 of file xmath.h.

TFltV TMom::DecileV [private]

Definition at line 140 of file xmath.h.

Referenced by Def(), and operator=().

TBool TMom::DefP [private]

Definition at line 131 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Mean [private]

Definition at line 138 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Median [private]

Definition at line 139 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Mn [private]

Definition at line 137 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Mx [private]

Definition at line 137 of file xmath.h.

Referenced by Def(), and operator=().

Definition at line 141 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Quart1 [private]

Definition at line 139 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Quart3 [private]

Definition at line 139 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::SDev [private]

Definition at line 138 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::SErr [private]

Definition at line 138 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::SumW [private]

Definition at line 133 of file xmath.h.

Referenced by Def(), and operator=().

Definition at line 136 of file xmath.h.

Referenced by operator=().

TBool TMom::UsableP [private]

Definition at line 135 of file xmath.h.

Referenced by Def(), and operator=().

TInt TMom::Vals [private]

Definition at line 134 of file xmath.h.

Referenced by GetValVStr(), operator<(), operator=(), and operator==().

TFlt TMom::ValSumW [private]

Definition at line 133 of file xmath.h.

Referenced by Def(), and operator=().

Definition at line 132 of file xmath.h.

Referenced by Def(), and operator=().

TFlt TMom::Vari [private]

Definition at line 138 of file xmath.h.

Referenced by Def(), and operator=().


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