SNAP Library 2.1, User Reference  2013-09-25 10:47:25
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>

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.

                                                                 {
  NewThetaV.Gen(ThetaV.Len());
  for (int i = 0; i < ThetaV.Len(); i++) {
    NewThetaV[i] = TMath::Round(ThetaV[i], 3); }
}
void TKronMaxLL::RoundTheta ( const TFltV ThetaV,
TKronMtx Kronecker 
) [static]

Definition at line 2361 of file kronecker.cpp.

                                                                    {
  Kronecker.GenMtx((int)sqrt((double)ThetaV.Len()));
  for (int i = 0; i < ThetaV.Len(); i++) {
    Kronecker.At(i) = TMath::Round(ThetaV[i], 3); }
}
void TKronMaxLL::SetPerm ( const char &  PermId)

Definition at line 2297 of file kronecker.cpp.

                                           {
  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)");
}
void TKronMaxLL::Test ( ) [static]

Definition at line 2367 of file kronecker.cpp.

                      {
  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()));*/
}

Member Data Documentation

Definition at line 280 of file kronecker.h.

Definition at line 281 of file kronecker.h.


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