Construct a configuration that includes the specified properties from
both vertices and edges.
555109
public static AtlasElementPropertyConfig includeProperties(final Set<String> vertexPropertyKeys,
                                                               final Set<String> edgePropertyKeys) {
        return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.INCLUDE,
                ElementPropertiesRule.INCLUDE);
    }
218716
private <E> Collection<Block<S, L>> initialize(UniversalGraph<S, E, ?, L> graph,
                                                   Collection<? extends S> initialNodes) {
        Iterable<? extends S> origStates;
        if (initialNodes == null || initialNodes.isEmpty()) {
            origStates = graph.getNodes();
        } else {
            origStates = GraphTraversal.depthFirstOrder(graph, initialNodes);
        }

        Map<L, TransitionLabel<S, L>> transitionMap = new HashMap<>();

        stateStorage = graph.createStaticNodeMapping();

        int numStates = 0;
        for (S origState : origStates) {
            State<S, L> state = new State<>(numStates++, origState);
            stateStorage.put(origState, state);
            stateList.add(state);
        }

        InitialPartitioning<S, L> initPartitioning = new HashMapInitialPartitioning<>(graph);

        for (State<S, L> state : stateList) {
            S origState = state.getOriginalState();

            Block<S, L> block = initPartitioning.getBlock(origState);
            block.addState(state);

            for (E edge : graph.getOutgoingEdges(origState)) {
                S origTarget = graph.getTarget(edge);
                State<S, L> target = stateStorage.get(origTarget);
                L label = graph.getEdgeProperty(edge);
                TransitionLabel<S, L> transition = transitionMap.computeIfAbsent(label, TransitionLabel::new);
                Edge<S, L> edgeObj = new Edge<>(state, target, transition);
                state.addOutgoingEdge(edgeObj);
                target.addIncomingEdge(edgeObj);
            }
        }
        stateList.quickClear();

        return initPartitioning.getInitialBlocks();
    }
70865
def _init_filled_edges(self, renderer, properties, edge_mapping):
        ""
        glyph_model = Patches if self.filled else Bezier
        allowed_properties = glyph_model.properties()
        for glyph_type in ('', 'selection_', 'nonselection_', 'hover_', 'muted_'):
            glyph = getattr(renderer.edge_renderer, glyph_type+'glyph', None)
            if glyph is None:
                continue
            group_properties = dict(properties)
            props = self._process_properties(self.edge_glyph, group_properties, {})
            filtered = self._filter_properties(props, glyph_type, allowed_properties)
            new_glyph = glyph_model(**dict(filtered, **edge_mapping))
            setattr(renderer.edge_renderer, glyph_type+'glyph', new_glyph)
887930
public Config buildConfig(EcoTopologyDefinition topologyDefinition)
      throws IllegalArgumentException {

    Map<String, Object> configMap = topologyDefinition.getConfig();
    Config config = new Config();
    for (Map.Entry<String, Object> entry: configMap.entrySet()) {

      if (entry.getKey().equals(COMPONENT_RESOURCE_MAP)) {

        setComponentLevelResource(config, entry);

      } else if (entry.getKey().equals(COMPONENT_JVM_OPTIONS)) {

        List<Object> objects = (List<Object>) entry.getValue();
        for (Object obj : objects) {
          String objString = obj.toString();
          objString = objString.replace(LEFT_BRACE, WHITESPACE);
          objString = objString.replace(RIGHT_BRACE, WHITESPACE);

          int idIndex = objString.indexOf(ID);
          int optionsIndex = objString.indexOf(OPTIONS);

          String id = getIdValue(objString, idIndex);

          String jvmOptions;
          if (optionsIndex != -1) {

            int equalsIndex = objString.indexOf(EQUALS, optionsIndex);
            jvmOptions = objString.substring(equalsIndex + 1, objString.length());

            jvmOptions = jvmOptions.replace(LEFT_BRACKET, "")
                .replace(RIGHT_BRACKET, "");

          } else {
            throw new IllegalArgumentException(
                "You must specify the JVM options for your component");
          }

          config.setComponentJvmOptions(id, jvmOptions);
        }

      } else {
        config.put(entry.getKey(), entry.getValue());
      }

    }
    return config;
  }
92612
private EdgeSet<T> addIfAbsent(int v) {
        S edges = getEdgeSet(v);
        if (edges == null) {
            edges = createEdgeSet(v);
            vertexToEdges.put(v, edges);
        }
        return edges;
    }
132881
private synchronized Map<String, Map<String, Collection<Index<Node>>>> initIndexConfiguration() {
        Map<String, Map<String, Collection<Index<Node>>>> indexesByLabelAndProperty = new HashMap<>();
        try (Transaction tx = graphDatabaseService.beginTx() ) {

            final IndexManager indexManager = graphDatabaseService.index();
            for (String indexName : indexManager.nodeIndexNames()) {

                final Index<Node> index = indexManager.forNodes(indexName);
                Map<String, String> indexConfig = indexManager.getConfiguration(index);

                if (Util.toBoolean(indexConfig.get("autoUpdate"))) {
                    String labels = indexConfig.getOrDefault("labels", "");
                    for (String label : labels.split(":")) {
                        Map<String, Collection<Index<Node>>> propertyKeyToIndexMap = indexesByLabelAndProperty.computeIfAbsent(label, s -> new HashMap<>());
                        String[] keysForLabel = indexConfig.getOrDefault("keysForLabel:" + label, "").split(":");
                        for (String property : keysForLabel) {
                            propertyKeyToIndexMap.computeIfAbsent(property, s -> new ArrayList<>()).add(index);
                        }
                    }
                }
            }
            tx.success();
        }
        return indexesByLabelAndProperty;
    }
296364
function(property) {
    var prop = $.splat(property || [ 'current', 'start', 'end' ]);
    NodeDim.compute(this.graph, prop, this.config);
    this.graph.computeLevels(this.root, 0, "ignore");
    var lengthFunc = this.createLevelDistanceFunc(); 
    this.computeAngularWidths(prop);
    this.computePositions(prop, lengthFunc);
  }
1114299
def get_properties_from_graph(graph):
        
        # collapse to single list
        property_set = set()
        for row in graph.predicates():
            property_set.add(row)

        return property_set
342024
void build(int nodeOffset, GraphMeshData graphData, List<int[]> connections) {
		for (int n = 0; n < connections.size(); n++) {
			int[] nodeConnections = connections.get(n);
			MeshData tile = graphData.getTile(n);
			Poly node = graphData.getNode(n);
			for (int connection : nodeConnections) {
				MeshData neighbourTile = graphData.getTile(connection - nodeOffset);
				if (neighbourTile != tile) {
					buildExternalLink(tile, node, neighbourTile);
				} else {
					Poly neighbour = graphData.getNode(connection - nodeOffset);
					buildInternalLink(tile, node, neighbourTile, neighbour);
				}
			}
		}
	}
140663
public static AtlasElementPropertyConfig excludeProperties(final Set<String> vertexPropertyKeys,
                                                               final Set<String> edgePropertyKeys) {
        return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.EXCLUDE,
                ElementPropertiesRule.EXCLUDE);
    }
15886
def features_node_edge_graph(obj):
    
    points = {}
    features = obj['features']
    for feature in tqdm(obj['features']):
        for (lon, lat) in geojson.utils.coords(feature):
            points.setdefault((lon, lat), 0)
            points[(lon, lat)] += 1
    points = [p for (p, c) in points.items() if c > 1]
    features = [geojson.Point(p) for p in points]

    # For each feature, split it into "edge" features
    # that occur between every point.
    for f in tqdm(obj['features']):
        seqs = []
        seq = []
        for point in geojson.utils.coords(f):
            if len(seq) > 0:
                seq.append(point)
            if point in points:
                seq.append(point)
                if len(seq) > 1 and seq[0] in points:
                    seqs.append(seq)
                    seq = [point]
        for seq in seqs:
            features.append(geojson.Feature(geometry={"coordinates":seq, "type":f['geometry']['type']}, properties=f['properties'], type=f['type']))

    obj['features'] = features
    return obj
539311
def set_for_computations(self, value):
        
        if self.mesh._compute_at_vertices:
            self._vertices = value
        else:
            self._centers = value
807814
private Graph<Module> buildGraph(Map<Module, Set<Module>> edges) {
        Graph.Builder<Module> builder = new Graph.Builder<>();
        Set<Module> visited = new HashSet<>();
        Deque<Module> deque = new LinkedList<>();
        edges.entrySet().stream().forEach(e -> {
            Module m = e.getKey();
            deque.add(m);
            e.getValue().stream().forEach(v -> {
                deque.add(v);
                builder.addEdge(m, v);
            });
        });

        // read requires transitive from ModuleDescriptor
        Module source;
        while ((source = deque.poll()) != null) {
            if (visited.contains(source))
                continue;

            visited.add(source);
            builder.addNode(source);
            Module from = source;
            requiresTransitive(from).forEach(m -> {
                deque.add(m);
                builder.addEdge(from, m);
            });
        }
        return builder.build();
    }
1221222
def add_edge(*vertices, **kvargs)
      edge = new_edge(*vertices, mixins: @mixins, **kvargs)
      insert_edge(edge)
      vertices.each { |vertex| callback(vertex, :edge_added, edge) }
      edge
    end
38976
private static Graph buildGraph() {
        Graph g = new TinkerGraph();
        //add vertices
        Vertex v1 = g.addVertex("v1");
        Vertex v2 = g.addVertex("v2");
        Vertex v3 = g.addVertex("v3");
        Vertex v4 = g.addVertex("v4");
        Vertex v5 = g.addVertex("v5");
        Vertex v6 = g.addVertex("v6");

        //add edges labeled with costs
        Edge e1 = g.addEdge("e1", v1, v2, "(7, 1)");
        e1.setProperty("c1", 7);
        e1.setProperty("c2", 1);

        Edge e2 = g.addEdge("e2", v1, v3, "(1, 4)");
        e2.setProperty("c1", 1);
        e2.setProperty("c2", 4);

        Edge e3 = g.addEdge("e3", v1, v4, "(2, 1)");
        e3.setProperty("c1", 2);
        e3.setProperty("c2", 1);

        Edge e4 = g.addEdge("e4", v2, v4, "(1, 1)");
        e4.setProperty("c1", 1);
        e4.setProperty("c2", 1);

        Edge e5 = g.addEdge("e5", v2, v6, "(2, 1)");
        e5.setProperty("c1", 2);
        e5.setProperty("c2", 1);

        Edge e6 = g.addEdge("e6", v3, v4, "(1, 1)");
        e6.setProperty("c1", 1);
        e6.setProperty("c2", 1);

        Edge e7 = g.addEdge("e7", v4, v5, "(3, 2)");
        e7.setProperty("c1", 3);
        e7.setProperty("c2", 2);

        Edge e8 = g.addEdge("e8", v4, v6, "(4, 8)");
        e8.setProperty("c1", 4);
        e8.setProperty("c2", 8);

        Edge e9 = g.addEdge("e9", v5, v6, "(1, 1)");
        e9.setProperty("c1", 1);
        e9.setProperty("c2", 1);

        return g;
    }
1317735
function buildConcepts(item, fullDimensions) {
  function isInitiallyActive(dimensionId, value, index) {
    if (!defined(item.selectedInitially)) {
      return index === 0;
    }
    var dimensionSelectedInitially = item.selectedInitially[dimensionId];
    if (!defined(dimensionSelectedInitially)) {
      return index === 0;
    }
    return dimensionSelectedInitially.indexOf(value.id) >= 0;
  }

  var conceptDimensions = getShownDimensions(
    item,
    fullDimensions,
    fullDimensions
  );
  fixSelectedInitially(item, conceptDimensions); // Note side-effect.
  var concepts = conceptDimensions.map(function(dimension, i) {
    var allowMultiple =
      item.allSingleValuedDimensionIds.indexOf(dimension.id) === -1;
    var concept = new DisplayVariablesConcept(dimension.name, {
      isOpen: false,
      allowMultiple: allowMultiple,
      requireSomeActive: true,
      exclusiveChildIds: getTotalValueIdsForDimensionId(item, dimension.id)
    });
    concept.id = dimension.id;
    concept.items = dimension.values.map(function(value, index) {
      return new VariableConcept(renameValue(item, value.name), {
        parent: concept,
        id: value.id,
        active: isInitiallyActive(concept.id, value, index)
      });
    });
    return concept;
  });
  if (concepts.length > 0) {
    return [new SummaryConcept(undefined, { items: concepts, isOpen: false })];
  }
  return [];
}
255374
def combined_properties(self, suffix):
        

        props = [y for x, y in self.settings.items() if x.endswith(suffix)]
        properties = itertools.chain(*props)

        processed_props = [x for x in properties]
        return processed_props