SNAP Library , Developer Reference  2013-01-07 14:03:36
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
TKronMaxLL Class Reference

#include <kronecker.h>

Collaboration diagram for TKronMaxLL:

List of all members.

Classes

class  TFEval

Public Member Functions

 TKronMaxLL (const PNGraph &GraphPt, const TKronMtx &StartParam)
void SetPerm (const char &PermId)
void GradDescent (const int &NIter, const double &LrnRate, const double &MnStep, const double &MxStep, const double &WarmUp, const double &NSamples)

Static Public Member Functions

static void RoundTheta (const TFltV &ThetaV, TFltV &NewThetaV)
static void RoundTheta (const TFltV &ThetaV, TKronMtx &Kronecker)
static void Test ()

Private Attributes

THash< TKronMtx, TFEvalFEvalH
TKroneckerLL KronLL

Detailed Description

Definition at line 265 of file kronecker.h.


Constructor & Destructor Documentation

TKronMaxLL::TKronMaxLL ( const PNGraph GraphPt,
const TKronMtx StartParam 
) [inline]

Definition at line 283 of file kronecker.h.

: KronLL(GraphPt, StartParam) { }

Member Function Documentation

void TKronMaxLL::GradDescent ( const int &  NIter,
const double &  LrnRate,
const double &  MnStep,
const double &  MxStep,
const double &  WarmUp,
const double &  NSamples 
)
void TKronMaxLL::RoundTheta ( const TFltV ThetaV,
TFltV NewThetaV 
) [static]

Definition at line 2354 of file kronecker.cpp.

References TVec< TVal >::Gen(), TVec< TVal >::Len(), and TMath::Round().

                                                                 {
  NewThetaV.Gen(ThetaV.Len());
  for (int i = 0; i < ThetaV.Len(); i++) {
    NewThetaV[i] = TMath::Round(ThetaV[i], 3); }
}

Here is the call graph for this function:

void TKronMaxLL::RoundTheta ( const TFltV ThetaV,
TKronMtx Kronecker 
) [static]

Definition at line 2361 of file kronecker.cpp.

References TKronMtx::At(), TKronMtx::GenMtx(), TVec< TVal >::Len(), and TMath::Round().

                                                                    {
  Kronecker.GenMtx((int)sqrt((double)ThetaV.Len()));
  for (int i = 0; i < ThetaV.Len(); i++) {
    Kronecker.At(i) = TMath::Round(ThetaV[i], 3); }
}

Here is the call graph for this function:

void TKronMaxLL::SetPerm ( const char &  PermId)

Definition at line 2297 of file kronecker.cpp.

References FailR, KronLL, TKroneckerLL::SetDegPerm(), TKroneckerLL::SetOrderPerm(), and TKroneckerLL::SetRndPerm().

Referenced by Test().

                                           {
  if (PermId == 'o') KronLL.SetOrderPerm();
  else if (PermId == 'd') KronLL.SetDegPerm();
  else if (PermId == 'r') KronLL.SetRndPerm();
  else FailR("Unknown permutation type (o,d,r)");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TKronMaxLL::Test ( ) [static]

Definition at line 2367 of file kronecker.cpp.

References TKronMtx::GenFastKronecker(), TKronMtx::GetMtx(), TVec< TFlt >::GetV(), TKronMtx::PutRndSeed(), and SetPerm().

                      {
  TKronMtx::PutRndSeed(1);
  TKronMtx KronParam = TKronMtx::GetMtx("0.8 0.7; 0.6 0.5");
  PNGraph Graph  = TKronMtx::GenFastKronecker(KronParam, 8, true, 1);

  TKronMaxLL KronMaxLL(Graph, TFltV::GetV(0.9, 0.7, 0.5, 0.3));
  KronMaxLL.SetPerm('d');
  //KronMaxLL.MaximizeLL(10000, 50000);
  /*TKroneckerLL KronLL(Graph, *TKronMtx::GetMtx("0.9 0.7; 0.5 0.3"));
  KronLL.SetDegPerm();
  KronLL.GradDescent(0.005/double(Graph->GetNodes()));*/
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 280 of file kronecker.h.

Definition at line 281 of file kronecker.h.

Referenced by SetPerm().


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