-
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 #45 from JavierMarrero/development
Integration 'development' -> 'main' v0.7.0
- Loading branch information
Showing
30 changed files
with
3,164 additions
and
2,872 deletions.
There are no files selected for viewing
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,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 |
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,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 |
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
59 changes: 59 additions & 0 deletions
59
src/cu/edu/cujae/graphy/algorithms/ColorableAlgorithm.java
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 |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
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
Oops, something went wrong.