Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.RoutesFloydWarshall.GetIntermediatePath C# (CSharp) Метод

GetIntermediatePath() приватный Метод

private GetIntermediatePath ( City source, City target ) : List
source City
target City
Результат List
        private List<City> GetIntermediatePath(City source, City target)
        {
            if(P[source.Index, target.Index] == null)  {
                return new List<City>();
            }
            List<City> path = new List<City>();
            path.AddRange( GetIntermediatePath(source, P[source.Index, target.Index]));
            path.Add( P[source.Index, target.Index] );
            path.AddRange( GetIntermediatePath(P[source.Index, target.Index], target));
            return path;
        }