Package moss

Class EdgePatternMgr

java.lang.Object
moss.EdgePatternMgr
All Implemented Interfaces:
Serializable

public class EdgePatternMgr extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    protected int
    the base support (largest possible support)
    protected moss.EdgePattern[]
    the hash table of the extension edges
    protected int
    the number of added edge patterns (full and partial)
    protected boolean
    whether edges are to be treated as directed
    protected int[]
    the support values for each edge type
  • Constructor Summary

    Constructors
    Constructor
    Description
    EdgePatternMgr(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 Type
    Method
    Description
    void
    add(int type, int src, int dst, int supp)
    Add an edge pattern.
    void
    add(Edge edge, int supp)
    Add an edge pattern.
    int
    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
    getSupp(Edge edge)
    Get the support of an edge pattern (given an example edge).
    int
    Get the support of an edge pattern (given an example edge), for an unknown source node.
    int
    Get the support of an edge pattern (given an example edge).
    void
    Show the content of an edge pattern manager (for debugging).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dir

      protected boolean dir
      whether edges are to be treated as directed
    • bins

      protected moss.EdgePattern[] bins
      the hash table of the extension edges
    • cnt

      protected int cnt
      the number of added edge patterns (full and partial)
    • supps

      protected int[] supps
      the support values for each edge type
    • base

      protected int base
      the 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 directed
      types - the number of different edge types
      hsize - the initial size of the hash table
      base - 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 directed
      types - the number of different edge types
      base - 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 types
      hsize - the initial size of the hash table
      base - 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 types
      base - 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 type
      src - 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

      public void add(Edge edge, int supp)
      Add an edge pattern.
      Parameters:
      edge - an edge representing the pattern
      supp - 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 type
      src - 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

      public int getSupp(Edge edge)
      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

      public int getSuppSrc(Edge edge)
      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

      public int getSuppDest(Edge edge)
      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)