com.googlecode.blaisemath.graph.StaticGraphLayout Maven / Gradle / Ivy
package com.googlecode.blaisemath.graph;
/*
* #%L
* BlaiseGraphTheory
* --
* Copyright (C) 2009 - 2019 Elisha Peterson
* --
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.google.common.graph.Graph;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.awt.geom.Point2D;
import java.util.Map;
/**
* Performs a 2D layout on a graph, using a given set of parameters. Initial conditions may be provided directly to the
* algorithm, but anything else impacting the layout should go into the parameters object.
*
* @param object describing layout parameters
*
* @author Elisha Peterson
*/
public interface StaticGraphLayout
extends ParameterSupplier
{
/**
* Perform layout on given graph, and return result.
* @param graph node type
* @param g a graph written in terms of adjacencies
* @param ic initial conditions
* @param parameters parameters for the layout, e.g. radius
* @return a mapping of points to nodes
*/
Map layout(Graph g, @Nullable Map ic, P parameters);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy