src/main/java/com/mxgraph/analysis/mxGraphStructure.java
public static boolean isCutEdge(mxAnalysisGraph aGraph, Object edge)
	{
		mxGraph graph = aGraph.getGraph();
		mxIGraphModel model = graph.getModel();
		mxCostFunction costFunction = aGraph.getGenerator().getCostFunction();
		mxGraphView view = graph.getView();

		int srcValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, true), null));
		int destValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, false), null));

		if (aGraph.getTerminal(edge, false) != null || aGraph.getTerminal(edge, true) != null)
		{
			Object[] cells = model.cloneCells(aGraph.getChildCells(graph.getDefaultParent(), true, true), true);
			mxGraphModel modelCopy = new mxGraphModel();
			mxGraph graphCopy = new mxGraph(modelCopy);
			graphCopy.addCells(cells);
			mxAnalysisGraph aGraphCopy = new mxAnalysisGraph();
			aGraphCopy.setGraph(graphCopy);
			aGraphCopy.setGenerator(aGraph.getGenerator());
			aGraphCopy.setProperties(aGraph.getProperties());

			Object[] edges = aGraphCopy.getChildEdges(aGraphCopy.getGraph().getDefaultParent());
			Object currEdge = edges[0];
			mxCostFunction costFunctionCopy = aGraphCopy.getGenerator().getCostFunction();
			mxGraphView viewCopy = graphCopy.getView();

			int currSrcValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, true), null));
			int currDestValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, false), null));
			int i = 0;

			while (currSrcValue != srcValue || currDestValue != destValue)
			{
				i++;
				currEdge = edges[i];
				currSrcValue = Integer.parseInt((String) modelCopy.getValue(aGraphCopy.getTerminal(currEdge, true)));
				currDestValue = Integer.parseInt((String) modelCopy.getValue(aGraphCopy.getTerminal(currEdge, false)));
			}

			graphCopy.removeCells(new Object[] { currEdge }, true);
			Object[][] oldComponents = getGraphComponents(aGraph);
			Object[][] newComponents = getGraphComponents(aGraphCopy);

			if (newComponents.length > oldComponents.length)
			{
				return true;
			}
		}

		return false;
	}
/**
	 * @param aGraph
	 * @param edge
	 * @return true if <b>edge</b> is a cut edge of <b>aGraph</b> 
	 */
@param aGraph
@param edge
@return true if edge is a cut edge of aGraph
@param aGraph @param edge @return true if edge is a cut edge of aGraph
public static boolean isCutEdge(mxAnalysisGraph aGraph, Object edge)
	{
		mxGraph graph = aGraph.getGraph();
		mxIGraphModel model = graph.getModel();
		mxCostFunction costFunction = aGraph.getGenerator().getCostFunction();
		mxGraphView view = graph.getView();
		int srcValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, true), null));
		int destValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, false), null));
		if (aGraph.getTerminal(edge, false) != null || aGraph.getTerminal(edge, true) != null)
		{
			Object[] cells = model.cloneCells(aGraph.getChildCells(graph.getDefaultParent(), true, true), true);
			mxGraphModel modelCopy = new mxGraphModel();
			mxGraph graphCopy = new mxGraph(modelCopy);
			graphCopy.addCells(cells);
			mxAnalysisGraph aGraphCopy = new mxAnalysisGraph();
			aGraphCopy.setGraph(graphCopy);
			aGraphCopy.setGenerator(aGraph.getGenerator());
			aGraphCopy.setProperties(aGraph.getProperties());
			Object[] edges = aGraphCopy.getChildEdges(aGraphCopy.getGraph().getDefaultParent());
			Object currEdge = edges[0];
			mxCostFunction costFunctionCopy = aGraphCopy.getGenerator().getCostFunction();
			mxGraphView viewCopy = graphCopy.getView();
			int currSrcValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, true), null));
			int currDestValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, false), null));
			int i = 0;
			while (currSrcValue != srcValue || currDestValue != destValue)
			{
				i++;
				currEdge = edges[i];
				currSrcValue = Integer.parseInt((String) modelCopy.getValue(aGraphCopy.getTerminal(currEdge, true)));
				currDestValue = Integer.parseInt((String) modelCopy.getValue(aGraphCopy.getTerminal(currEdge, false)));
			}
			graphCopy.removeCells(new Object[] { currEdge }, true);
			Object[][] oldComponents = getGraphComponents(aGraph);
			Object[][] newComponents = getGraphComponents(aGraphCopy);
			if (newComponents.length > oldComponents.length)
			{
				return true;
			}
		}
		return false;
	}
public static boolean isCutEdge ( mxAnalysisGraph aGraph , Object edge ) { mxGraph graph = aGraph . getGraph ( ) ; mxIGraphModel model = graph . getModel ( ) ; mxCostFunction costFunction = aGraph . getGenerator ( ) . getCostFunction ( ) ; mxGraphView view = graph . getView ( ) ; int srcValue = ( int ) costFunction . getCost ( new mxCellState ( view , aGraph . getTerminal ( edge , true ) , null ) ) ; int destValue = ( int ) costFunction . getCost ( new mxCellState ( view , aGraph . getTerminal ( edge , false ) , null ) ) ; if ( aGraph . getTerminal ( edge , false ) != null || aGraph . getTerminal ( edge , true ) != null ) { Object [ ] cells = model . cloneCells ( aGraph . getChildCells ( graph . getDefaultParent ( ) , true , true ) , true ) ; mxGraphModel modelCopy = new mxGraphModel ( ) ; mxGraph graphCopy = new mxGraph ( modelCopy ) ; graphCopy . addCells ( cells ) ; mxAnalysisGraph aGraphCopy = new mxAnalysisGraph ( ) ; aGraphCopy . setGraph ( graphCopy ) ; aGraphCopy . setGenerator ( aGraph . getGenerator ( ) ) ; aGraphCopy . setProperties ( aGraph . getProperties ( ) ) ; Object [ ] edges = aGraphCopy . getChildEdges ( aGraphCopy . getGraph ( ) . getDefaultParent ( ) ) ; Object currEdge = edges [ 0 ] ; mxCostFunction costFunctionCopy = aGraphCopy . getGenerator ( ) . getCostFunction ( ) ; mxGraphView viewCopy = graphCopy . getView ( ) ; int currSrcValue = ( int ) costFunctionCopy . getCost ( new mxCellState ( viewCopy , aGraphCopy . getTerminal ( currEdge , true ) , null ) ) ; int currDestValue = ( int ) costFunctionCopy . getCost ( new mxCellState ( viewCopy , aGraphCopy . getTerminal ( currEdge , false ) , null ) ) ; int i = 0 ; while ( currSrcValue != srcValue || currDestValue != destValue ) { i ++ ; currEdge = edges [ i ] ; currSrcValue = Integer . parseInt ( ( String ) modelCopy . getValue ( aGraphCopy . getTerminal ( currEdge , true ) ) ) ; currDestValue = Integer . parseInt ( ( String ) modelCopy . getValue ( aGraphCopy . getTerminal ( currEdge , false ) ) ) ; } graphCopy . removeCells ( new Object [ ] { currEdge } , true ) ; Object [ ] [ ] oldComponents = getGraphComponents ( aGraph ) ; Object [ ] [ ] newComponents = getGraphComponents ( aGraphCopy ) ; if ( newComponents . length > oldComponents . length ) { return true ; } } return false ; }
@param aGraph
 @param edge
 @return true if <b>edge</b> is a cut edge of <b>aGraph</b>
@param aGraph @param edge @return true if <b > edge< / b > is a cut edge of <b > aGraph< / b >