Class MCPIntent

java.lang.Object
org.iam.intent.MCPIntent

public class MCPIntent extends Object
MCPIntent represents a finding with domain values and symbolic encoding.

Encapsulates domain values, supports refinement, and provides symbolic encoding using MCPBitVector. Used for intent mining, reduction, and merging.

Since:
2025-02-28
Author:
  • Constructor Details

    • MCPIntent

      public MCPIntent()
      Default constructor. Initializes domain label trees and domain values.
    • MCPIntent

      public MCPIntent(MCPIntent other)
      Copy constructor. Copies domain values from another MCPIntent.
      Parameters:
      other - the MCPIntent to copy
      Throws:
      IllegalArgumentException - if the other object is null
  • Method Details

    • setDomainLabelTrees

      public static void setDomainLabelTrees(DomainLabelTrees domainLabelTrees)
      Sets the domain label trees for all MCPIntent instances.
      Parameters:
      domainLabelTrees - the DomainLabelTrees instance
    • setMCPLabelsFactory

      public static void setMCPLabelsFactory(org.mcp.core.MCPFactory cube)
      Sets the MCPFactory for all MCPIntent instances.
      Parameters:
      cube - the MCPFactory instance
    • getRootFinding

      public static MCPIntent getRootFinding(org.mcp.core.MCPFactory cubeFactory)
      Creates and returns the root intent, initializing domain values for all domains.
      Parameters:
      cubeFactory - the MCPFactory instance
      Returns:
      the root MCPIntent
    • refines

      public HashSet<MCPIntent> refines()
      Refines the current intent into a set of more specific intents.
      Returns:
      a set of refined MCPIntent objects
    • getMCPNode

      public org.mcp.core.MCPBitVector getMCPNode()
      Gets the symbolic encoding node for this intent. If not yet calculated, computes it as the conjunction of all domain values.
      Returns:
      the MCPBitVector node
    • setDomainValue

      public void setDomainValue(String domain, Object value)
      Sets the value for a specific domain.
      Parameters:
      domain - the domain name
      value - the value to set
    • getDomainValues

      public HashMap<String,Object> getDomainValues()
      Returns the domain values for this intent.
      Returns:
      the domain values map
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns a string representation of this intent.
      Overrides:
      toString in class Object
      Returns:
      a string representation