Package moss
Class EdgePatternMgr
java.lang.Object
moss.EdgePatternMgr
- All Implemented Interfaces:
Serializable
Class for an edge pattern manager.
An edge pattern manager collects information about single edge patterns, both full (both incident node types considered) and partial (only one or no incident node type considered).
- Since:
- 2020.10.16
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
the base support (largest possible support)protected moss.EdgePattern[]
the hash table of the extension edgesprotected int
the number of added edge patterns (full and partial)protected boolean
whether edges are to be treated as directedprotected int[]
the support values for each edge type -
Constructor Summary
ConstructorsConstructorDescriptionEdgePatternMgr
(boolean dir, int types, int base) Create an edge pattern manager.EdgePatternMgr
(boolean dir, int types, int hsize, int base) Create an edge pattern manager.EdgePatternMgr
(int types, int base) Create an extension edge manager.EdgePatternMgr
(int types, int hsize, int base) Create an edge pattern manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int type, int src, int dst, int supp) Add an edge pattern.void
Add an edge pattern.int
getSupp()
Get the base support (largest possible support).int
getSupp
(int type) Get the support of an edge pattern (edge type only).int
getSupp
(int type, int src, int dst) Get the support of an edge pattern (edge type and two node types).int
Get the support of an edge pattern (given an example edge).int
getSuppDest
(Edge edge) Get the support of an edge pattern (given an example edge), for an unknown source node.int
getSuppSrc
(Edge edge) Get the support of an edge pattern (given an example edge).void
show()
Show the content of an edge pattern manager (for debugging).
-
Field Details
-
dir
protected boolean dirwhether edges are to be treated as directed -
bins
protected moss.EdgePattern[] binsthe hash table of the extension edges -
cnt
protected int cntthe number of added edge patterns (full and partial) -
supps
protected int[] suppsthe support values for each edge type -
base
protected int basethe base support (largest possible support)
-
-
Constructor Details
-
EdgePatternMgr
public EdgePatternMgr(boolean dir, int types, int hsize, int base) Create an edge pattern manager.- Parameters:
dir
- whether edges are to be treated as directedtypes
- the number of different edge typeshsize
- the initial size of the hash tablebase
- the base support (largest possible support)- Since:
- 2021.10.10 (Christian Borgelt)
-
EdgePatternMgr
public EdgePatternMgr(boolean dir, int types, int base) Create an edge pattern manager.- Parameters:
dir
- whether edges are to be treated as directedtypes
- the number of different edge typesbase
- the base support (largest possible support)- Since:
- 2021.10.10 (Christian Borgelt)
-
EdgePatternMgr
public EdgePatternMgr(int types, int hsize, int base) Create an edge pattern manager.- Parameters:
types
- the number of different edge typeshsize
- the initial size of the hash tablebase
- the base support (largest possible support)- Since:
- 2020.10.16 (Christian Borgelt)
-
EdgePatternMgr
public EdgePatternMgr(int types, int base) Create an extension edge manager.- Parameters:
types
- the number of different edge typesbase
- the base support (largest possible support)- Since:
- 2020.10.16 (Christian Borgelt)
-
-
Method Details
-
add
public void add(int type, int src, int dst, int supp) Add an edge pattern.- Parameters:
type
- the edge typesrc
- the node type of one incident node (source)dst
- the node type of other incident node (destination)supp
- the support of the edge pattern- Since:
- 2020.10.16 (Christian Borgelt)
-
add
Add an edge pattern.- Parameters:
edge
- an edge representing the patternsupp
- the support of the edge pattern- Since:
- 2020.10.16 (Christian Borgelt)
-
getSupp
public int getSupp()Get the base support (largest possible support).- Returns:
- the base support (largest possible support)
- Since:
- 2020.10.16 (Christian Borgelt)
-
getSupp
public int getSupp(int type) Get the support of an edge pattern (edge type only).- Parameters:
type
- the edge type- Returns:
- the support of the edge pattern
- Since:
- 2020.10.16 (Christian Borgelt)
-
getSupp
public int getSupp(int type, int src, int dst) Get the support of an edge pattern (edge type and two node types).- Parameters:
type
- the edge typesrc
- the node type of one incident node (source)dst
- the node type of other incident node (destination)- Returns:
- the support of the edge pattern
- Since:
- 2020.10.16 (Christian Borgelt)
-
getSupp
Get the support of an edge pattern (given an example edge).- Parameters:
edge
- a example edge- Returns:
- the support of the edge pattern
- Since:
- 2020.10.16 (Christian Borgelt)
-
getSuppSrc
Get the support of an edge pattern (given an example edge).- Parameters:
edge
- a example edge- Returns:
- the support of the edge pattern
- Since:
- 2020.10.16 (Christian Borgelt)
-
getSuppDest
Get the support of an edge pattern (given an example edge), for an unknown source node.- Parameters:
edge
- a example edge- Returns:
- the support of the edge pattern
- Since:
- 2021.10.10 (Christian Borgelt)
-
show
public void show()Show the content of an edge pattern manager (for debugging).- Since:
- 2020.10.16 (Christian Borgelt)
-