ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Core.CIM Namespace / CentralityRelationshipInterpretation Enumeration
Example Example

In This Topic
    CentralityRelationshipInterpretation Enumeration
    In This Topic
    Specifies the way relationships are interpreted for centrality computations.
    Syntax
    public enum CentralityRelationshipInterpretation : System.Enum, System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable  
    Public Enum CentralityRelationshipInterpretation 
       Inherits System.Enum
       Implements System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable 
    Members
    MemberDescription
    Directed Relationships are considered to be directed.
    Reversed Relationships are considered to be directed and their direction is reversed.
    Undirected Relationships are considered to be undirected.
    Remarks
    CentralityMeasure.Coreness is only compatible with Undirected.
    Example
    Configure Centrality
    //using ArcGIS.Core.Data.Knowledge.Extensions;
    
    await QueuedTask.Run(() =>
    {
    
      //configure centrality with custom settings
      var kg_config = new CIMKnowledgeGraphCentralityConfiguration()
      {
        RelationshipsInterpretation = CentralityRelationshipInterpretation.Directed,
        MultiedgeFactor = 1.0,//cumulative importance
        Normalization = CentralityScoresNormalization.None,
        DefaultRelationshipCost = 1.0,
        DefaultRelationshipImportance = 1.0,
        RelationshipCostProperty = string.Empty,
        RelationshipImportanceProperty = string.Empty
      };
    
      //include all entities from the kg in the subgraph
      //(no filters)
      var kg_subgraph = new CIMKnowledgeGraphSubGraph();
    
      //include the relevant centrality measures
      CentralityMeasure[] measures = [
        CentralityMeasure.Degree,
        CentralityMeasure.InDegree,
        CentralityMeasure.OutDegree,
        CentralityMeasure.Betweenness,
        CentralityMeasure.Closeness,
        CentralityMeasure.Harmonic,
        CentralityMeasure.Eigenvector,
        CentralityMeasure.PageRank
      ];
      //Note: CentralityMeasure.Coreness cannot be calculated
      //with directed relationships, so it is not included here.
      //Specfying Coreness (with directed or reveresed relationships) will
      //throw an exception
    
      //compute centrality
      var kg_centrality_results = kg.ComputeCentrality(
                                        kg_config, kg_subgraph, measures);
      //TODO process results
    });
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Core.CIM.CentralityRelationshipInterpretation

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also