Skip to content

Commit

Permalink
Merge pull request #21 from JavierMarrero/development-the_surgeon
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
JavierMarrero authored Nov 11, 2022
2 parents a496247 + cfc21f3 commit e95dc85
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 109 deletions.
29 changes: 0 additions & 29 deletions newhtml.html

This file was deleted.

92 changes: 52 additions & 40 deletions src/cu/edu/cujae/graphy/algorithms/Dial.java
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
}

}
89 changes: 49 additions & 40 deletions src/cu/edu/cujae/graphy/algorithms/Kosaraju.java
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
}

}

0 comments on commit e95dc85

Please sign in to comment.