SNAP Library 3.0, Developer Reference
2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Implements a single CrossNet consisting of edges between two TModeNets (could be the same TModeNet) More...
#include <mmnet.h>
Classes | |
class | TAFltI |
Node/edge float attribute iterator. Iterates through all nodes/edges for one float attribute. More... | |
class | TAIntI |
Node/edge integer attribute iterator. Iterates through all nodes/edges for one integer attribute. More... | |
class | TAStrI |
Node/edge string attribute iterator. Iterates through all nodes/edges for one string attribute. More... | |
class | TCrossEdge |
A single edge in the cross net. Has an Edge Id, and the source and destination node ids. (Mode ids are implicit from TCrossNet) More... | |
class | TCrossEdgeI |
Edge iterator. Only forward iteration (operator++) is supported. More... | |
Public Member Functions | |
TCrossNet () | |
TCrossNet (TInt MId1, TInt MId2, TInt LId) | |
TCrossNet (TInt MId1, TInt MId2, TBool IsDir, TInt LId) | |
TCrossNet (TSIn &SIn) | |
TCrossNet (const TCrossNet &OtherTCrossNet) | |
TCrossNet & | operator= (const TCrossNet &OtherTCrossNet) |
bool | IsEdge (const int &EId) const |
Tests whether an edge with edge ID EId exists in the graph. More... | |
int | GetMxEId () const |
int | GetEdges () const |
Returns the number of edges in the graph. More... | |
void | Clr () |
Deletes all nodes and edges from the graph. More... | |
int | AddEdge (const int &sourceNId, const int &destNId, int EId=-1) |
Adds an edge to the CrossNet; Mode1 NId should be the sourceNId always, regardless of whether edge is directed. More... | |
TCrossEdgeI | GetEdgeI (const int &EId) const |
Edge iterators. More... | |
TCrossEdgeI | BegEdgeI () const |
TCrossEdgeI | EndEdgeI () const |
int | DelEdge (const int &EId) |
Deletes an edge by its id. More... | |
int | GetMode1 () const |
Gets the id of the src mode. More... | |
int | GetMode2 () const |
Gets the id of the dst mode. More... | |
void | Save (TSOut &SOut) const |
Saves the TCrossNet to the binary stream. More... | |
bool | IsDirected () const |
Whether edges in the crossnet are directed. More... | |
void | AttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of attr names for edge EId. More... | |
void | AttrNameEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Names) const |
void | AttrValueEI (const TInt &EId, TStrV &Values) const |
Returns a vector of attr values for edge EId. More... | |
void | AttrValueEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Values) const |
void | IntAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of int attr names for edge EId. More... | |
void | IntAttrNameEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Names) const |
void | IntAttrValueEI (const TInt &EId, TIntV &Values) const |
Returns a vector of attr values for edge EId. More... | |
void | IntAttrValueEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TIntV &Values) const |
void | StrAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of str attr names for node NId. More... | |
void | StrAttrNameEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Names) const |
void | StrAttrValueEI (const TInt &EId, TStrV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | StrAttrValueEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Values) const |
void | FltAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of int attr names for node NId. More... | |
void | FltAttrNameEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TStrV &Names) const |
void | FltAttrValueEI (const TInt &EId, TFltV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | FltAttrValueEI (const TInt &EId, TStrIntPrH::TIter CrossHI, TFltV &Values) const |
int | AddIntAttrDatE (const TCrossEdgeI &EdgeI, const TInt &value, const TStr &attr) |
Attribute based add function for attr to Int value. More... | |
int | AddIntAttrDatE (const int &EId, const TInt &value, const TStr &attr) |
int | AddStrAttrDatE (const TCrossEdgeI &EdgeI, const TStr &value, const TStr &attr) |
Attribute based add function for attr to Str value. More... | |
int | AddStrAttrDatE (const int &EId, const TStr &value, const TStr &attr) |
int | AddFltAttrDatE (const TCrossEdgeI &EdgeI, const TFlt &value, const TStr &attr) |
Attribute based add function for attr to Flt value. More... | |
int | AddFltAttrDatE (const int &EId, const TFlt &value, const TStr &attr) |
TInt | GetIntAttrDatE (const TCrossEdgeI &EdgeI, const TStr &attr) |
Gets the value of int attr from the edge attr value vector. More... | |
TInt | GetIntAttrDatE (const int &EId, const TStr &attr) |
TStr | GetStrAttrDatE (const TCrossEdgeI &EdgeI, const TStr &attr) |
Gets the value of str attr from the edge attr value vector. More... | |
TStr | GetStrAttrDatE (const int &EId, const TStr &attr) |
TFlt | GetFltAttrDatE (const TCrossEdgeI &EdgeI, const TStr &attr) |
Gets the value of flt attr from the edge attr value vector. More... | |
TFlt | GetFltAttrDatE (const int &EId, const TStr &attr) |
TAIntI | BegEAIntI (const TStr &attr) const |
Returns an iterator referring to the first edge's int attribute. More... | |
TAIntI | EndEAIntI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAIntI | GetEAIntI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
TAStrI | BegEAStrI (const TStr &attr) const |
Returns an iterator referring to the first edge's str attribute. More... | |
TAStrI | EndEAStrI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAStrI | GetEAStrI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
TAFltI | BegEAFltI (const TStr &attr) const |
Returns an iterator referring to the first edge's flt attribute. More... | |
TAFltI | EndEAFltI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAFltI | GetEAFltI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
int | DelAttrDatE (const TCrossEdgeI &EdgeI, const TStr &attr) |
Deletes the edge attribute for NodeI. More... | |
int | DelAttrDatE (const int &EId, const TStr &attr) |
int | AddIntAttrE (const TStr &attr, TInt defaultValue=TInt::Mn) |
Adds a new Int edge attribute to the hashmap. More... | |
int | AddStrAttrE (const TStr &attr, TStr defaultValue=TStr::GetNullStr()) |
Adds a new Str edge attribute to the hashmap. More... | |
int | AddFltAttrE (const TStr &attr, TFlt defaultValue=TFlt::Mn) |
Adds a new Flt edge attribute to the hashmap. More... | |
int | DelAttrE (const TStr &attr) |
Removes all the values for edge attr. More... | |
bool | IsAttrDeletedE (const int &EId, const TStr &attr) const |
bool | IsIntAttrDeletedE (const int &EId, const TStr &attr) const |
bool | IsStrAttrDeletedE (const int &EId, const TStr &attr) const |
bool | IsFltAttrDeletedE (const int &EId, const TStr &attr) const |
bool | EdgeAttrIsDeleted (const int &EId, const TStrIntPrH::TIter &CrossHI) const |
bool | EdgeAttrIsIntDeleted (const int &EId, const TStrIntPrH::TIter &CrossHI) const |
bool | EdgeAttrIsStrDeleted (const int &EId, const TStrIntPrH::TIter &CrossHI) const |
bool | EdgeAttrIsFltDeleted (const int &EId, const TStrIntPrH::TIter &CrossHI) const |
TStr | GetEdgeAttrValue (const int &EId, const TStrIntPrH::TIter &CrossHI) const |
Private Types | |
enum | { IntType, StrType, FltType } |
Private Member Functions | |
void | SetParentPointer (TMMNet *parent) |
TInt | GetIntAttrDefaultE (const TStr &attribute) const |
Gets Int edge attribute val. If not a proper attr, return default. More... | |
TStr | GetStrAttrDefaultE (const TStr &attribute) const |
Gets Str edge attribute val. If not a proper attr, return default. More... | |
TFlt | GetFltAttrDefaultE (const TStr &attribute) const |
Gets Flt edge attribute val. If not a proper attr, return default. More... | |
int | GetAttrTypeE (const TStr &attr) const |
TCrossEdge & | GetEdge (int eid) |
Private Attributes | |
THash< TInt, TCrossEdge > | CrossH |
TInt | MxEId |
The HashTable from Edge id to the corresponding Edge. More... | |
TInt | Mode1 |
TInt | Mode2 |
The first mode. In the case of directed crossnets, this is implicitly understood to be the source mode. More... | |
TBool | IsDirect |
The second mode. In the case of directed crossnets, this is implicitly understood to be the destination mode. More... | |
TInt | CrossNetId |
TMMNet * | Net |
TStrIntPrH | KeyToIndexTypeE |
THash< TStr, TInt > | IntDefaultsE |
THash< TStr, TStr > | StrDefaultsE |
THash< TStr, TFlt > | FltDefaultsE |
TVec< TIntV > | VecOfIntVecsE |
TVec< TStrV > | VecOfStrVecsE |
TVec< TFltV > | VecOfFltVecsE |
Friends | |
class | TMMNet |
class | TModeNet |
Implements a single CrossNet consisting of edges between two TModeNets (could be the same TModeNet)
The class corresponding to one particular CrossNet in a TMMNet. Has a CrossNet name, and two modes. Can be either undirected or directed. If it is directed, it is directed in one direction only: from mode 1 to mode 2.
|
private |
Enumerator | |
---|---|
IntType | |
StrType | |
FltType |
|
inline |
Definition at line 262 of file mmnet.h.
Definition at line 264 of file mmnet.h.
Definition at line 266 of file mmnet.h.
|
inline |
Definition at line 268 of file mmnet.h.
|
inline |
Definition at line 270 of file mmnet.h.
int TCrossNet::AddEdge | ( | const int & | sourceNId, |
const int & | destNId, | ||
int | EId = -1 |
||
) |
Adds an edge to the CrossNet; Mode1 NId should be the sourceNId always, regardless of whether edge is directed.
Definition at line 188 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), TModeNet::AddNeighbor(), CrossH, CrossNetId, FltDefaultsE, TMMNet::GetCrossName(), THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), GetIntAttrDefaultE(), THash< TKey, TDat, THashFunc >::GetKeyId(), THash< TKey, TDat, THashFunc >::GetKeyV(), TStr::GetNullStr(), GetStrAttrDefaultE(), TVec< TVal, TSizeTy >::Ins(), IntDefaultsE, IsDirect, TNEANet::IsNode(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), M1, M2, TInt::Mn, TFlt::Mn, Mode1, Mode2, TMath::Mx(), MxEId, Net, StrDefaultsE, TMMNet::TModeNetH, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
Referenced by TSnap::LoadCrossNet().
|
inline |
Attribute based add function for attr to Flt value.
Definition at line 374 of file mmnet.h.
References AddFltAttrDatE(), and TCrossNet::TCrossEdgeI::GetId().
Referenced by AddFltAttrDatE(), and TSnap::LoadCrossNet().
Definition at line 471 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), CrossH, FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), THash< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Adds a new Flt edge attribute to the hashmap.
Definition at line 561 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), FltDefaultsE, FltType, TVec< TVal, TSizeTy >::Ins(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, and VecOfFltVecsE.
|
inline |
Attribute based add function for attr to Int value.
Definition at line 368 of file mmnet.h.
References AddIntAttrDatE(), and TCrossNet::TCrossEdgeI::GetId().
Referenced by AddIntAttrDatE(), and TSnap::LoadCrossNet().
Definition at line 425 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), CrossH, THash< TKey, TDat, THashFunc >::GetDat(), GetIntAttrDefaultE(), THash< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), IntType, IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), MxEId, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Adds a new Int edge attribute to the hashmap.
Definition at line 522 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), IntDefaultsE, IntType, THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), MxEId, and VecOfIntVecsE.
|
inline |
Attribute based add function for attr to Str value.
Definition at line 371 of file mmnet.h.
References AddStrAttrDatE(), and TCrossNet::TCrossEdgeI::GetId().
Referenced by AddStrAttrDatE(), and TSnap::LoadCrossNet().
Definition at line 448 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultE(), TVec< TVal, TSizeTy >::Ins(), IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, StrType, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
int TCrossNet::AddStrAttrE | ( | const TStr & | attr, |
TStr | defaultValue = TStr::GetNullStr() |
||
) |
Adds a new Str edge attribute to the hashmap.
Definition at line 542 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, StrDefaultsE, StrType, and VecOfStrVecsE.
Returns a vector of attr names for edge EId.
Definition at line 333 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::AttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 284 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsDeleted(), THashKeyDatI< TKey, TDat >::GetKey(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of attr values for edge EId.
Definition at line 337 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::AttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 294 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsDeleted(), GetEdgeAttrValue(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns an iterator referring to the first edge's flt attribute.
Definition at line 412 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Returns an iterator referring to the first edge's int attribute.
Definition at line 388 of file mmnet.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Returns an iterator referring to the first edge's str attribute.
Definition at line 401 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
|
inline |
Definition at line 317 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and CrossH.
Referenced by TMMNet::ToNetwork(), and TMMNet::ToNetwork2().
void TCrossNet::Clr | ( | ) |
Deletes all nodes and edges from the graph.
Definition at line 174 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::Clr(), TVec< TVal, TSizeTy >::Clr(), TMMNet::ClrNbr(), CrossH, CrossNetId, FltDefaultsE, IntDefaultsE, IsDirect, KeyToIndexTypeE, Mode1, Mode2, MxEId, Net, StrDefaultsE, TBool::Val, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
Referenced by TModeNet::Clr().
|
inline |
Deletes the edge attribute for NodeI.
Definition at line 425 of file mmnet.h.
References DelAttrDatE(), and TCrossNet::TCrossEdgeI::GetId().
Referenced by DelAttrDatE().
int TCrossNet::DelAttrDatE | ( | const int & | EId, |
const TStr & | attr | ||
) |
Definition at line 507 of file mmnet.cpp.
References CrossH, FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), GetIntAttrDefaultE(), THash< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultE(), IntType, KeyToIndexTypeE, StrType, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
int TCrossNet::DelAttrE | ( | const TStr & | attr | ) |
Removes all the values for edge attr.
Definition at line 580 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::DelKey(), FltDefaultsE, FltType, THash< TKey, TDat, THashFunc >::GetDat(), IntDefaultsE, IntType, THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, StrDefaultsE, StrType, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
int TCrossNet::DelEdge | ( | const int & | EId | ) |
Deletes an edge by its id.
Definition at line 256 of file mmnet.cpp.
References CrossH, CrossNetId, THash< TKey, TDat, THashFunc >::DelKey(), TModeNet::DelNeighbor(), TCrossNet::TCrossEdge::DstNId, TMMNet::GetCrossName(), THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), TMMNet::GetModeNetById(), TStr::GetNullStr(), IsDirect, TVec< TVal, TSizeTy >::Len(), TInt::Mn, TFlt::Mn, Mode1, Mode2, Net, TCrossNet::TCrossEdge::SrcNId, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
Referenced by TModeNet::DelNode().
bool TCrossNet::EdgeAttrIsDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | CrossHI | ||
) | const |
Definition at line 386 of file mmnet.cpp.
References EdgeAttrIsFltDeleted(), EdgeAttrIsIntDeleted(), and EdgeAttrIsStrDeleted().
Referenced by AttrNameEI(), and AttrValueEI().
bool TCrossNet::EdgeAttrIsFltDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | CrossHI | ||
) | const |
Definition at line 405 of file mmnet.cpp.
References CrossH, FltType, THashKeyDatI< TKey, TDat >::GetDat(), GetFltAttrDefaultE(), THashKeyDatI< TKey, TDat >::GetKey(), THash< TKey, TDat, THashFunc >::GetKeyId(), and VecOfFltVecsE.
Referenced by EdgeAttrIsDeleted(), FltAttrNameEI(), FltAttrValueEI(), and IsFltAttrDeletedE().
bool TCrossNet::EdgeAttrIsIntDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | CrossHI | ||
) | const |
Definition at line 393 of file mmnet.cpp.
References CrossH, THashKeyDatI< TKey, TDat >::GetDat(), GetIntAttrDefaultE(), THashKeyDatI< TKey, TDat >::GetKey(), THash< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), IntType, and VecOfIntVecsE.
Referenced by EdgeAttrIsDeleted(), IntAttrNameEI(), IntAttrValueEI(), and IsIntAttrDeletedE().
bool TCrossNet::EdgeAttrIsStrDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | CrossHI | ||
) | const |
Definition at line 399 of file mmnet.cpp.
References CrossH, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THash< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultE(), StrType, and VecOfStrVecsE.
Referenced by EdgeAttrIsDeleted(), IsStrAttrDeletedE(), StrAttrNameEI(), and StrAttrValueEI().
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 416 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 392 of file mmnet.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 404 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
|
inline |
Definition at line 318 of file mmnet.h.
References CrossH, and THash< TKey, TDat, THashFunc >::EndI().
Referenced by TMMNet::ToNetwork(), and TMMNet::ToNetwork2().
Returns a vector of int attr names for node NId.
Definition at line 359 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::FltAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 346 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsFltDeleted(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of attr values for node NId.
Definition at line 363 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::FltAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TFltV & | Values | ||
) | const |
Definition at line 356 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsFltDeleted(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::IsEnd(), and VecOfFltVecsE.
|
private |
Definition at line 167 of file mmnet.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, and TPair< TVal1, TVal2 >::Val1.
Referenced by TMMNet::AddEdgeAttributes(), and TMMNet::ToNetwork().
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 420 of file mmnet.h.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 396 of file mmnet.h.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 408 of file mmnet.h.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
|
inlineprivate |
Definition at line 302 of file mmnet.h.
References CrossH.
Referenced by TMMNet::ToNetworkMP().
TStr TCrossNet::GetEdgeAttrValue | ( | const int & | EId, |
const TStrIntPrH::TIter & | CrossHI | ||
) | const |
Definition at line 411 of file mmnet.cpp.
References CrossH, FltType, THashKeyDatI< TKey, TDat >::GetDat(), THash< TKey, TDat, THashFunc >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THash< TKey, TDat, THashFunc >::GetKeyId(), TStr::GetNullStr(), TStr::GetStr(), TVec< TVal, TSizeTy >::GetVal(), IntType, KeyToIndexTypeE, StrType, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
Referenced by AttrValueEI().
|
inline |
Edge iterators.
Definition at line 316 of file mmnet.h.
References CrossH, and THash< TKey, TDat, THashFunc >::GetI().
Referenced by TMMNet::ToNetworkMP().
|
inline |
Returns the number of edges in the graph.
Definition at line 309 of file mmnet.h.
References CrossH, and THash< TKey, TDat, THashFunc >::Len().
Referenced by TMMNet::ToNetworkMP().
|
inline |
Gets the value of flt attr from the edge attr value vector.
Definition at line 384 of file mmnet.h.
References GetFltAttrDatE(), and TCrossNet::TCrossEdgeI::GetId().
Referenced by TMMNet::AddEdgeAttributes(), GetFltAttrDatE(), and TMMNet::ToNetwork().
Definition at line 503 of file mmnet.cpp.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Gets Flt edge attribute val. If not a proper attr, return default.
Definition at line 300 of file mmnet.h.
References FltDefaultsE, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), and TFlt::Mn.
Referenced by AddEdge(), AddFltAttrDatE(), DelAttrDatE(), EdgeAttrIsFltDeleted(), TCrossNet::TAFltI::IsDeleted(), and TMMNet::ToNetwork().
|
inline |
Gets the value of int attr from the edge attr value vector.
Definition at line 378 of file mmnet.h.
References TCrossNet::TCrossEdgeI::GetId(), and GetIntAttrDatE().
Referenced by TMMNet::AddEdgeAttributes(), GetIntAttrDatE(), and TMMNet::ToNetwork().
Definition at line 495 of file mmnet.cpp.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Gets Int edge attribute val. If not a proper attr, return default.
Definition at line 296 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), IntDefaultsE, THash< TKey, TDat, THashFunc >::IsKey(), and TInt::Mn.
Referenced by AddEdge(), AddIntAttrDatE(), DelAttrDatE(), EdgeAttrIsIntDeleted(), TCrossNet::TAIntI::IsDeleted(), and TMMNet::ToNetwork().
|
inline |
Gets the id of the src mode.
Definition at line 322 of file mmnet.h.
References Mode1.
Referenced by TCrossNet::TCrossEdgeI::GetSrcModeId(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
|
inline |
Gets the id of the dst mode.
Definition at line 324 of file mmnet.h.
References Mode2.
Referenced by TCrossNet::TCrossEdgeI::GetDstModeId(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
|
inline |
Definition at line 307 of file mmnet.h.
References MxEId.
Referenced by TMMNet::ToNetworkMP().
|
inline |
Gets the value of str attr from the edge attr value vector.
Definition at line 381 of file mmnet.h.
References TCrossNet::TCrossEdgeI::GetId(), and GetStrAttrDatE().
Referenced by TMMNet::AddEdgeAttributes(), GetStrAttrDatE(), and TMMNet::ToNetwork().
Definition at line 499 of file mmnet.cpp.
References CrossH, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
Gets Str edge attribute val. If not a proper attr, return default.
Definition at line 298 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TStr::GetNullStr(), THash< TKey, TDat, THashFunc >::IsKey(), and StrDefaultsE.
Referenced by AddEdge(), AddStrAttrDatE(), DelAttrDatE(), EdgeAttrIsStrDeleted(), TCrossNet::TAStrI::IsDeleted(), and TMMNet::ToNetwork().
Returns a vector of int attr names for edge EId.
Definition at line 341 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::IntAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 304 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsIntDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), IntType, and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of attr values for edge EId.
Definition at line 345 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::IntAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TIntV & | Values | ||
) | const |
Definition at line 314 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsIntDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), TVec< TVal, TSizeTy >::GetVal(), IntType, THashKeyDatI< TKey, TDat >::IsEnd(), and VecOfIntVecsE.
bool TCrossNet::IsAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Definition at line 367 of file mmnet.cpp.
References IsFltAttrDeletedE(), IsIntAttrDeletedE(), and IsStrAttrDeletedE().
|
inline |
Whether edges in the crossnet are directed.
Definition at line 331 of file mmnet.h.
References IsDirect.
Referenced by TCrossNet::TCrossEdgeI::IsDirected(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
|
inline |
Tests whether an edge with edge ID EId exists in the graph.
Definition at line 305 of file mmnet.h.
References CrossH, and THash< TKey, TDat, THashFunc >::IsKey().
Referenced by AddFltAttrDatE(), AddIntAttrDatE(), AddStrAttrDatE(), and TMMNet::ToNetworkMP().
bool TCrossNet::IsFltAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Definition at line 382 of file mmnet.cpp.
References EdgeAttrIsFltDeleted(), THash< TKey, TDat, THashFunc >::GetI(), and KeyToIndexTypeE.
Referenced by IsAttrDeletedE().
bool TCrossNet::IsIntAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Definition at line 374 of file mmnet.cpp.
References EdgeAttrIsIntDeleted(), THash< TKey, TDat, THashFunc >::GetI(), and KeyToIndexTypeE.
Referenced by IsAttrDeletedE().
bool TCrossNet::IsStrAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Definition at line 378 of file mmnet.cpp.
References EdgeAttrIsStrDeleted(), THash< TKey, TDat, THashFunc >::GetI(), and KeyToIndexTypeE.
Referenced by IsAttrDeletedE().
Definition at line 275 of file mmnet.h.
References CrossH, CrossNetId, FltDefaultsE, IntDefaultsE, IsDirect, KeyToIndexTypeE, Mode1, Mode2, MxEId, Net, StrDefaultsE, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
|
inline |
Saves the TCrossNet to the binary stream.
Definition at line 326 of file mmnet.h.
References CrossH, CrossNetId, FltDefaultsE, IntDefaultsE, IsDirect, KeyToIndexTypeE, Mode1, Mode2, MxEId, THash< TKey, TDat, THashFunc >::Save(), TVec< TVal, TSizeTy >::Save(), TBool::Save(), TInt::Save(), StrDefaultsE, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
|
private |
Definition at line 280 of file mmnet.cpp.
References Net.
Referenced by TMMNet::AddCrossNet(), and TMMNet::DelCrossNet().
Returns a vector of str attr names for node NId.
Definition at line 351 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::StrAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 325 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsStrDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashKeyDatI< TKey, TDat >::IsEnd(), and StrType.
Returns a vector of attr values for node NId.
Definition at line 355 of file mmnet.h.
References THash< TKey, TDat, THashFunc >::BegI(), and KeyToIndexTypeE.
void TCrossNet::StrAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | CrossHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 335 of file mmnet.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsStrDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::IsEnd(), StrType, and VecOfStrVecsE.
|
private |
Definition at line 246 of file mmnet.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddIntAttrDatE(), AddStrAttrDatE(), BegEdgeI(), Clr(), DelAttrDatE(), DelEdge(), EdgeAttrIsFltDeleted(), EdgeAttrIsIntDeleted(), EdgeAttrIsStrDeleted(), EndEdgeI(), GetEAFltI(), GetEAIntI(), GetEAStrI(), GetEdge(), GetEdgeAttrValue(), GetEdgeI(), GetEdges(), GetFltAttrDatE(), GetIntAttrDatE(), GetStrAttrDatE(), IsEdge(), operator=(), and Save().
|
private |
Definition at line 256 of file mmnet.h.
Referenced by AddEdge(), AddFltAttrE(), Clr(), DelAttrE(), GetFltAttrDefaultE(), operator=(), and Save().
Definition at line 254 of file mmnet.h.
Referenced by AddEdge(), AddIntAttrE(), Clr(), DelAttrE(), GetIntAttrDefaultE(), operator=(), and Save().
|
private |
The second mode. In the case of directed crossnets, this is implicitly understood to be the destination mode.
Definition at line 250 of file mmnet.h.
Referenced by AddEdge(), Clr(), DelEdge(), TModeNet::DelNode(), IsDirected(), operator=(), and Save().
|
private |
Definition at line 253 of file mmnet.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddFltAttrE(), AddIntAttrDatE(), AddIntAttrE(), AddStrAttrDatE(), AddStrAttrE(), AttrNameEI(), AttrValueEI(), BegEAFltI(), BegEAIntI(), BegEAStrI(), Clr(), DelAttrDatE(), DelAttrE(), EndEAFltI(), EndEAIntI(), EndEAStrI(), FltAttrNameEI(), FltAttrValueEI(), GetAttrTypeE(), GetEAFltI(), GetEAIntI(), GetEAStrI(), GetEdgeAttrValue(), GetFltAttrDatE(), GetIntAttrDatE(), GetStrAttrDatE(), IntAttrNameEI(), IntAttrValueEI(), IsFltAttrDeletedE(), IsIntAttrDeletedE(), IsStrAttrDeletedE(), operator=(), Save(), StrAttrNameEI(), and StrAttrValueEI().
|
private |
Definition at line 248 of file mmnet.h.
Referenced by AddEdge(), Clr(), TMMNet::DelCrossNet(), DelEdge(), TModeNet::DelNode(), GetMode1(), TMMNet::GetSubgraphByModeNet(), operator=(), and Save().
|
private |
The first mode. In the case of directed crossnets, this is implicitly understood to be the source mode.
Definition at line 249 of file mmnet.h.
Referenced by AddEdge(), Clr(), TMMNet::DelCrossNet(), DelEdge(), TModeNet::DelNode(), GetMode2(), TMMNet::GetSubgraphByModeNet(), operator=(), and Save().
|
private |
The HashTable from Edge id to the corresponding Edge.
Definition at line 247 of file mmnet.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddFltAttrE(), AddIntAttrDatE(), AddIntAttrE(), AddStrAttrDatE(), AddStrAttrE(), Clr(), GetMxEId(), operator=(), Save(), and TMMNet::ToNetworkMP().
|
private |
Definition at line 252 of file mmnet.h.
Referenced by AddEdge(), Clr(), DelEdge(), operator=(), and SetParentPointer().
Definition at line 255 of file mmnet.h.
Referenced by AddEdge(), AddStrAttrE(), Clr(), DelAttrE(), GetStrAttrDefaultE(), operator=(), and Save().
Definition at line 259 of file mmnet.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddFltAttrE(), BegEAFltI(), Clr(), DelAttrDatE(), DelAttrE(), DelEdge(), EdgeAttrIsFltDeleted(), EndEAFltI(), FltAttrValueEI(), GetEAFltI(), GetEdgeAttrValue(), GetFltAttrDatE(), operator=(), and Save().
Definition at line 257 of file mmnet.h.
Referenced by AddEdge(), AddIntAttrDatE(), AddIntAttrE(), BegEAIntI(), Clr(), DelAttrDatE(), DelAttrE(), DelEdge(), EdgeAttrIsIntDeleted(), EndEAIntI(), GetEAIntI(), GetEdgeAttrValue(), GetIntAttrDatE(), IntAttrValueEI(), operator=(), and Save().
Definition at line 258 of file mmnet.h.
Referenced by AddEdge(), AddStrAttrDatE(), AddStrAttrE(), BegEAStrI(), Clr(), DelAttrDatE(), DelAttrE(), DelEdge(), EdgeAttrIsStrDeleted(), EndEAStrI(), GetEAStrI(), GetEdgeAttrValue(), GetStrAttrDatE(), operator=(), Save(), and StrAttrValueEI().