-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from JavierMarrero/development-the_surgeon
Bugfix
- Loading branch information
Showing
3 changed files
with
101 additions
and
109 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,52 @@ | ||
/* | ||
* Copyright (C) 2022 Ananda. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package cu.edu.cujae.graphy.algorithms; | ||
|
||
import cu.edu.cujae.graphy.core.Graph; | ||
import cu.edu.cujae.graphy.utils.Pair; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* El algoritmo de Dial, es decir, Dijkstra optimizado para pesos de rango pequeño, | ||
* emplea una nueva estructura denominada cubo y posee una complejidad de tiempo | ||
* O(E+WV), donde W es el peso máximo en cualquier borde del gráfico. | ||
* La distancia máxima entre dos nodos puede tener un máximo de w(V-1). | ||
* | ||
* | ||
* @author Ananda | ||
* @param <T> | ||
*/ | ||
public class Dial<T> extends AbstractAlgorithm<Map<Integer, Pair<Integer, List<Integer>>>>{ | ||
private Graph<T> graph; | ||
a | ||
|
||
} | ||
/* | ||
* Copyright (C) 2022 Ananda. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package cu.edu.cujae.graphy.algorithms; | ||
|
||
import cu.edu.cujae.graphy.core.Graph; | ||
import cu.edu.cujae.graphy.utils.Pair; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* El algoritmo de Dial, es decir, Dijkstra optimizado para pesos de rango pequeño, | ||
* emplea una nueva estructura denominada cubo y posee una complejidad de tiempo | ||
* O(E+WV), donde W es el peso máximo en cualquier borde del gráfico. | ||
* La distancia máxima entre dos nodos puede tener un máximo de w(V-1). | ||
* | ||
* | ||
* @author Ananda | ||
* @param <T> | ||
*/ | ||
public class Dial<T> extends AbstractAlgorithm<Map<Integer, Pair<Integer, List<Integer>>>> | ||
{ | ||
|
||
private Graph<T> graph; | ||
|
||
public Dial() | ||
{ | ||
super(null); | ||
} | ||
|
||
@Override | ||
public Algorithm<Map<Integer, Pair<Integer, List<Integer>>>> apply() | ||
{ | ||
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,49 @@ | ||
/* | ||
* Copyright (C) 2022 Ananda. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package cu.edu.cujae.graphy.algorithms; | ||
|
||
import cu.edu.cujae.graphy.core.Graph; | ||
import cu.edu.cujae.graphy.utils.Pair; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
*El algoritmo de Kosaraju está basado en DFS utilizado para encontrar componentes | ||
* fuertemente conexos (SCC) en un grafo.Si uno es capaz de alcanzar un vértice v | ||
*a partir del vértice u, entonces uno debería ser capaz de alcanzar el vértice u | ||
*a partir de v y si se cumple, puede decirse que v y u están en un subgrafo | ||
*fuertemente conectados. | ||
* | ||
* @author Ananda | ||
* @param <T> | ||
*/ | ||
public class Kosaraju<T> extends AbstractAlgorithm<Map<Integer, Pair<Integer, List<Integer>>>> { | ||
private Graph<T> graph; | ||
a | ||
|
||
} | ||
/* | ||
* Copyright (C) 2022 Ananda. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package cu.edu.cujae.graphy.algorithms; | ||
|
||
import cu.edu.cujae.graphy.core.Graph; | ||
|
||
/** | ||
* El algoritmo de Kosaraju está basado en DFS utilizado para encontrar componentes | ||
* fuertemente conexos (SCC) en un grafo.Si uno es capaz de alcanzar un vértice v | ||
* a partir del vértice u, entonces uno debería ser capaz de alcanzar el vértice u | ||
* a partir de v y si se cumple, puede decirse que v y u están en un subgrafo | ||
* fuertemente conectados. | ||
* | ||
* @author Ananda | ||
* @param <T> | ||
*/ | ||
public class Kosaraju<T> extends AbstractAlgorithm<Boolean> | ||
{ | ||
|
||
private Graph<T> graph; | ||
|
||
public Kosaraju() | ||
{ | ||
super(null); | ||
} | ||
|
||
@Override | ||
public Algorithm<Boolean> apply() | ||
{ | ||
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody | ||
} | ||
|
||
} |