Skip to content

Commit

Permalink
Merge pull request #45 from JavierMarrero/development
Browse files Browse the repository at this point in the history
Integration 'development' -> 'main' v0.7.0
  • Loading branch information
JavierMarrero authored Nov 13, 2022
2 parents 6d9ac6b + 29ef835 commit 7d0ed5d
Show file tree
Hide file tree
Showing 30 changed files with 3,164 additions and 2,872 deletions.
28 changes: 14 additions & 14 deletions lib/nblibraries.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
libs.CopyLibs.classpath=\
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.CopyLibs.displayName=CopyLibs Task
libs.CopyLibs.prop-version=3.0
libs.junit_5.displayName=JUnit 5.6.0
libs.junit_5.javadoc=\
${base}/junit_5/junit-jupiter-api-5.6.0-javadoc.jar;\
${base}/junit_5/junit-jupiter-params-5.6.0-javadoc.jar;\
${base}/junit_5/junit-jupiter-engine-5.6.0-javadoc.jar
libs.junit_5.prop-maven-dependencies=\n org.junit.jupiter:junit-jupiter-api:5.6.0:jar\n org.junit.jupiter:junit-jupiter-params:5.6.0:jar\n org.junit.jupiter:junit-jupiter-engine:5.6.0:jar\n
libs.junit_5.src=\
${base}/junit_5/junit-jupiter-api-5.6.0-sources.jar;\
${base}/junit_5/junit-jupiter-params-5.6.0-sources.jar;\
${base}/junit_5/junit-jupiter-engine-5.6.0-sources.jar
libs.CopyLibs.classpath=\
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.CopyLibs.displayName=CopyLibs Task
libs.CopyLibs.prop-version=3.0
libs.junit_5.displayName=JUnit 5.6.0
libs.junit_5.javadoc=\
${base}/junit_5/junit-jupiter-api-5.6.0-javadoc.jar;\
${base}/junit_5/junit-jupiter-params-5.6.0-javadoc.jar;\
${base}/junit_5/junit-jupiter-engine-5.6.0-javadoc.jar
libs.junit_5.prop-maven-dependencies=\n org.junit.jupiter:junit-jupiter-api:5.6.0:jar\n org.junit.jupiter:junit-jupiter-params:5.6.0:jar\n org.junit.jupiter:junit-jupiter-engine:5.6.0:jar\n
libs.junit_5.src=\
${base}/junit_5/junit-jupiter-api-5.6.0-sources.jar;\
${base}/junit_5/junit-jupiter-params-5.6.0-sources.jar;\
${base}/junit_5/junit-jupiter-engine-5.6.0-sources.jar
194 changes: 97 additions & 97 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=jlibgraph
application.vendor=Javier Marrero
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.modulepath=\
${run.modulepath}
debug.test.classpath=\
${run.test.classpath}
debug.test.modulepath=\
${run.test.modulepath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/jlibgraph.jar
dist.javadoc.dir=${dist.dir}/javadoc
dist.jlink.dir=${dist.dir}/jlink
dist.jlink.output=${dist.jlink.dir}/jlibgraph
endorsed.classpath=
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=true
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=9
javac.target=9
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=true
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=true
javadoc.windowtitle=JLibGraph API Reference
# The jlink additional root modules to resolve
jlink.additionalmodules=
# The jlink additional command line parameters
jlink.additionalparam=
jlink.launcher=true
jlink.launcher.name=jlibgraph
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
platform.active=default_platform
project.license=lgpl21
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=jlibgraph
application.vendor=Javier Marrero
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.modulepath=\
${run.modulepath}
debug.test.classpath=\
${run.test.classpath}
debug.test.modulepath=\
${run.test.modulepath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/jlibgraph.jar
dist.javadoc.dir=${dist.dir}/javadoc
dist.jlink.dir=${dist.dir}/jlink
dist.jlink.output=${dist.jlink.dir}/jlibgraph
endorsed.classpath=
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=true
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=9
javac.target=9
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=true
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=true
javadoc.windowtitle=JLibGraph API Reference
# The jlink additional root modules to resolve
jlink.additionalmodules=
# The jlink additional command line parameters
jlink.additionalparam=
jlink.launcher=true
jlink.launcher.name=jlibgraph
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
platform.active=default_platform
project.license=lgpl21
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
2 changes: 1 addition & 1 deletion src/cu/edu/cujae/graphy/algorithms/AbstractAlgorithm.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public abstract class AbstractAlgorithm<T> implements Algorithm<T>
{

private T result;
T result;

protected AbstractAlgorithm(T result)
{
Expand Down
59 changes: 59 additions & 0 deletions src/cu/edu/cujae/graphy/algorithms/ColorableAlgorithm.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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.core.iterators.GraphIterator;

/**
*El objetivo de este algoritmo es determinar si un grafo no dirigido puede ser
* coloreado con m colores, de forma tal que dos vértices adyacentes no posean
* igual coloratura.
*
* @author Ananda
* @param <T>
*/
public class ColorableAlgorithm<T> extends AbstractAlgorithm<Boolean> {
private final Graph<T> graph;
private final int m;
private final String color;
private final GraphIterator<T> iter;

public ColorableAlgorithm(Graph<T> graph, int m, String color, GraphIterator<T> iter){
super(Boolean.TRUE);
if(graph.isDirected()){
throw new IllegalArgumentException(
"Attempted to apply Colorable algorithm to an directed graph.");
}
this.graph = graph;
this.m = m;
this.color = color;
this.iter = (GraphIterator<T>) graph.depthFirstSearchIterator(false);
}

@Override
public Algorithm<Boolean> apply(){
while(iter.hasNext()){

}

return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*/
package cu.edu.cujae.graphy.algorithms;

import cu.edu.cujae.graphy.core.Graph;
import cu.edu.cujae.graphy.core.WeightedGraph;
import cu.edu.cujae.graphy.core.iterators.GraphIterator;
import cu.edu.cujae.graphy.utils.Pair;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand All @@ -33,20 +35,25 @@
* @author Ananda
* @param <T>
*/
public class Dial<T> extends AbstractAlgorithm<Map<Integer, Pair<Integer, List<Integer>>>>
public class DialShortestPath<T> extends AbstractAlgorithm<Map<Integer, Pair<Integer, List<Integer>>>>
{
private final WeightedGraph<T> graph;
private final GraphIterator<T> iter;

private Graph<T> graph;

public Dial()
{
super(null);
public DialShortestPath(WeightedGraph<T> graph, GraphIterator<T> iter){
super(new HashMap<>(graph.size()));
if (!graph.isWeighted())
{
throw new IllegalArgumentException(
"Attempted to apply Dial algorithm to an unweighted graph.");
}
this.graph = graph;
this.iter = (GraphIterator<T>) graph.depthFirstSearchIterator(false);
}

@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
public Algorithm<Map<Integer, Pair<Integer, List<Integer>>>> apply(){
return this;
}

}
Loading

0 comments on commit 7d0ed5d

Please sign in to comment.