ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMKnowledgeGraphCentralityConfiguration Class / MultiedgeFactor Property
Example

In This Topic
    MultiedgeFactor Property (CIMKnowledgeGraphCentralityConfiguration)
    In This Topic
    Gets or sets the multiedge factor. Acceptable values lie in [0, 1]. In centrality computations, we reduce parallel relationships of a graph to a single edge. The computation of the importance of the single edge depends on the value of MultiedgeFactor. If MultiedgeFactor is 0, the importance of the single edge is the average of parallel relationships. If MultiedgeFactor is 1, the importance of the single edge is the sum of importances of parallel relationships. For values of MultiedgeFactor between 0 and 1, the importance of the single edge is linearly interpolated.
    Syntax
    Public Property MultiedgeFactor As Double
    public double MultiedgeFactor {get; set;}
    Example
    Configure Centrality
    {
      //using ArcGIS.Core.Data.Knowledge.Extensions;
    
      await QueuedTask.Run(() =>
      {
        //using(var kg = ....) {
        //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
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also