From 605d3c99dc7f42e577639894dbe1ab01feb6c257 Mon Sep 17 00:00:00 2001 From: Philipp Spohr <spohr.philipp@web.de> Date: Sat, 9 Sep 2017 15:27:41 +0200 Subject: [PATCH] Refactor --- LICENSE | 2 +- .../de/hhu/ba/yoshikoWrapper/CyActivator.java | 2 +- .../ba/yoshikoWrapper/core/AlgorithmTask.java | 1 + .../ba/yoshikoWrapper/core/NetworkParser.java | 1 + .../yoshikoWrapper/core/StatusInformer.java | 4 + .../{core => cytoUtil}/NetChangeListener.java | 3 +- .../{core => cytoUtil}/NodeMap.java | 2 +- .../hhu/ba/yoshikoWrapper/help/HelpLinks.java | 69 ++++++++++++++++-- .../ba/yoshikoWrapper/swing/FormatHelper.java | 24 +++--- .../{core => swing}/GraphicsLoader.java | 4 +- .../ba/yoshikoWrapper/swing/HintManager.java | 19 ++--- .../swing/components/ClusterView.java | 2 +- .../swing/components/HelpButton.java | 11 ++- .../swing/components/LanguageRenderer.java | 2 +- .../swing/components/LibStatusPanel.java | 2 +- .../swing/components/MainPanel.java | 2 +- .../swing/components/ResultPanel.java | 2 +- .../swing/components/YoshikoHeader.java | 2 +- src/main/resources/YoshikoStrings.properties | 1 + thesis/tex/Chapter/dm_impl.tex | 2 +- thesis/tex/Thesis.pdf | Bin 134681 -> 134687 bytes thesis/tex/Thesis.tex | 5 +- 22 files changed, 122 insertions(+), 40 deletions(-) rename src/main/java/de/hhu/ba/yoshikoWrapper/{core => cytoUtil}/NetChangeListener.java (97%) rename src/main/java/de/hhu/ba/yoshikoWrapper/{core => cytoUtil}/NodeMap.java (97%) rename src/main/java/de/hhu/ba/yoshikoWrapper/{core => swing}/GraphicsLoader.java (97%) diff --git a/LICENSE b/LICENSE index e79e5f8..f08b7e2 100644 --- a/LICENSE +++ b/LICENSE @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java b/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java index dbf57cc..34607e9 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java @@ -52,9 +52,9 @@ import de.hhu.ba.yoshikoWrapper.core.ConfigurationManager; import de.hhu.ba.yoshikoWrapper.core.CyCore; import de.hhu.ba.yoshikoWrapper.core.Hint; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; -import de.hhu.ba.yoshikoWrapper.core.NetChangeListener; import de.hhu.ba.yoshikoWrapper.core.YoshUtil; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; +import de.hhu.ba.yoshikoWrapper.cytoUtil.NetChangeListener; import de.hhu.ba.yoshikoWrapper.swing.HintManager; import de.hhu.ba.yoshikoWrapper.swing.components.MainPanel; diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/AlgorithmTask.java b/src/main/java/de/hhu/ba/yoshikoWrapper/core/AlgorithmTask.java index dbdfd41..faccd1c 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/AlgorithmTask.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/core/AlgorithmTask.java @@ -34,6 +34,7 @@ import org.cytoscape.work.AbstractTask; import org.cytoscape.work.TaskMonitor; import org.slf4j.Logger; +import de.hhu.ba.yoshikoWrapper.cytoUtil.NodeMap; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoCluster; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoResult; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoSolution; diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java b/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java index dabb092..eed69b6 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java @@ -29,6 +29,7 @@ import org.cytoscape.model.CyNetwork; import org.cytoscape.model.CyRow; import org.slf4j.Logger; +import de.hhu.ba.yoshikoWrapper.cytoUtil.NodeMap; import de.hhu.ba.yoshikoWrapper.logging.YoshikoLogger; import de.hhu.ba.yoshikoWrapper.swig.LibraryInput; diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/StatusInformer.java b/src/main/java/de/hhu/ba/yoshikoWrapper/core/StatusInformer.java index b4b054e..32987a6 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/StatusInformer.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/core/StatusInformer.java @@ -72,6 +72,10 @@ public class StatusInformer extends CplexInformer { else if (state == YoshikoState.REDUCTION_SN) { taskMonitor.setStatusMessage(LocalizationManager.get("status_reductionSN")); } + + else if (state == YoshikoState.SOLVING_ILP) { + taskMonitor.setStatusMessage(LocalizationManager.get("status_solvingILP")); + } } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NetChangeListener.java similarity index 97% rename from src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java rename to src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NetChangeListener.java index 8ab86ea..c5f9237 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NetChangeListener.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package de.hhu.ba.yoshikoWrapper.core; +package de.hhu.ba.yoshikoWrapper.cytoUtil; import org.cytoscape.application.events.SetCurrentNetworkEvent; import org.cytoscape.application.events.SetCurrentNetworkListener; @@ -34,6 +34,7 @@ import org.cytoscape.model.events.RemovedEdgesListener; import org.cytoscape.session.events.SessionLoadedEvent; import org.cytoscape.session.events.SessionLoadedListener; +import de.hhu.ba.yoshikoWrapper.core.CyCore; import de.hhu.ba.yoshikoWrapper.swing.components.ColumnMapper; public class NetChangeListener diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NodeMap.java b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NodeMap.java similarity index 97% rename from src/main/java/de/hhu/ba/yoshikoWrapper/core/NodeMap.java rename to src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NodeMap.java index 83a2999..6406ac9 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NodeMap.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/NodeMap.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package de.hhu.ba.yoshikoWrapper.core; +package de.hhu.ba.yoshikoWrapper.cytoUtil; import java.util.HashMap; import java.util.Map.Entry; diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java b/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java index 46d77a4..3b6b5d5 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java @@ -1,33 +1,92 @@ +/******************************************************************************* + * Copyright (C) 2017 Philipp Spohr + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + ******************************************************************************/ package de.hhu.ba.yoshikoWrapper.help; +import java.awt.Container; import java.net.URI; import java.net.URISyntaxException; -import java.util.HashMap; +import java.util.WeakHashMap; +import org.slf4j.Logger; + +import de.hhu.ba.yoshikoWrapper.logging.YoshikoLogger; import de.hhu.ba.yoshikoWrapper.swing.components.EditCostPanel; +/** + * Helper class that provides URIs to access the Bachelor Thesis paper sections that can be used as a manual + * + */ public final class HelpLinks { + //SYMBOLIC LINKS + + /** + * Convenience function for better code readability + */ + private static final Logger logger = YoshikoLogger.getInstance().getLogger(); + + // + + /** + * The base location of the bachelor thesis paper + */ private static final String docLocation = "file:///home/philipp/workspace/cs/BachelorThesis/YoshikoWrapper/thesis/tex/Thesis.pdf"; - private static final HashMap <Class<?>,URI> helpLinks; + /** + * A HashMap linking Classes to a link, pointing to a specific subsection of the BachelorThesis paper that is relevant for understanding the Class + */ + private static final WeakHashMap <Class<? extends Container>,URI> helpLinks; + /** + * Initialization for the HashMap + */ static { - helpLinks = new HashMap<Class<?>,URI>(); + helpLinks = new WeakHashMap<Class<? extends Container>,URI>(); try { helpLinks.put(EditCostPanel.class, (buildURI("subsubsection.2.2.1"))); } catch (URISyntaxException e) { - e.printStackTrace(); + logger.error("Error initializing URI for help file:\n"+e.getMessage()); } } - public static URI getHelpLink(Class<?> c) { + + /** + * Returns the URI that leads to the relevant help section for the class provided + * @param c The Container class for which the help link should be fetched + * @return The help link as URI + */ + public static URI getHelpLink(Class<? extends Container> c) { if (helpLinks.containsKey(c)) { return helpLinks.get(c); } return null; } + /** + * Internal helper function that builds a valid URI from the base address and the fragment denoting the relevant section + * @param fragment The fragment naming the nameddest in the pdf file + * @return The compound URI made from base address and fragment + * @throws URISyntaxException If invalid -> Should never be called during runtime in a stable version + */ private static URI buildURI(String fragment) throws URISyntaxException { return new URI(null,docLocation,"nameddest="+fragment); } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/FormatHelper.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/FormatHelper.java index faa161f..284757e 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/FormatHelper.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/FormatHelper.java @@ -1,16 +1,16 @@ /******************************************************************************* * Copyright (C) 2017 Philipp Spohr - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -27,19 +27,19 @@ import java.text.NumberFormat; import javax.swing.text.NumberFormatter; public class FormatHelper { - + public static NumberFormatter getIntegerFormatter() { return getIntegerFormatter(0, Integer.MAX_VALUE); } - + public static NumberFormatter getIntegerFormatter(int minValue, int maxValue) { NumberFormat format = NumberFormat.getInstance(); NumberFormatter formatter = new NumberFormatter(format); formatter.setValueClass(Integer.class); formatter.setMinimum(minValue); formatter.setMaximum(maxValue); - formatter.setCommitsOnValidEdit(true); - formatter.setAllowsInvalid(true); + applySharedAttributes(formatter); + return formatter; } @@ -50,11 +50,15 @@ public class FormatHelper { formatter.setValueClass(Double.class); formatter.setMinimum(minValue); formatter.setMaximum(maxValue); - formatter.setCommitsOnValidEdit(true); - formatter.setAllowsInvalid(true); - + applySharedAttributes(formatter); + return formatter; } + private static void applySharedAttributes(NumberFormatter formatter) { + + formatter.setCommitsOnValidEdit(true); + formatter.setAllowsInvalid(true); + } } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/GraphicsLoader.java similarity index 97% rename from src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java rename to src/main/java/de/hhu/ba/yoshikoWrapper/swing/GraphicsLoader.java index 1e2307c..ee1ae4b 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/GraphicsLoader.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package de.hhu.ba.yoshikoWrapper.core; +package de.hhu.ba.yoshikoWrapper.swing; import java.awt.Color; import java.awt.Image; @@ -31,6 +31,8 @@ import java.util.Locale; import javax.imageio.ImageIO; import javax.swing.ImageIcon; +import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; + public class GraphicsLoader { //TODO: Organize Images in HashMap for better readability / flexibility diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/HintManager.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/HintManager.java index d34d987..3c0d640 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/HintManager.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/HintManager.java @@ -9,7 +9,6 @@ import javax.swing.JOptionPane; import org.slf4j.Logger; import de.hhu.ba.yoshikoWrapper.core.CyCore; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.Hint; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.logging.YoshikoLogger; @@ -19,9 +18,11 @@ import de.hhu.ba.yoshikoWrapper.logging.YoshikoLogger; * */ public class HintManager { - + + //TODO: Implement as HashMap + private static Logger logger = YoshikoLogger.getInstance().getLogger(); - + private static final Runnable useMappingHint = new Runnable() { @Override @@ -30,7 +31,7 @@ public class HintManager { } }; - + private static final Runnable firstStart = new Runnable() { @Override @@ -41,7 +42,7 @@ public class HintManager { }; private final static Map<Hint,Runnable> hints; - + static { Map<Hint, Runnable> map = new HashMap<Hint,Runnable>(); map.put(Hint.USE_MAPPING, useMappingHint); @@ -54,9 +55,9 @@ public class HintManager { CyCore.getConfig( hint.toString()+"shown" ) == null - ) + ) { - + //Save property so we dont show this again CyCore.cm.getProperties().setProperty(hint.toString()+ "shown", "1"); if (hints.get(hint) != null) { @@ -65,10 +66,10 @@ public class HintManager { else { logger.warn("Asked for a hint that doesnt exist with hint name: "+hint.toString()); } - + } } - + } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ClusterView.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ClusterView.java index 5ae0d70..78ec25c 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ClusterView.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ClusterView.java @@ -35,9 +35,9 @@ import javax.swing.border.Border; import org.cytoscape.model.CyNode; import org.cytoscape.util.swing.BasicCollapsiblePanel; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoCluster; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.swing.SwingUtil; @SuppressWarnings("serial") diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/HelpButton.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/HelpButton.java index efaeac1..6459527 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/HelpButton.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/HelpButton.java @@ -11,16 +11,25 @@ import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.help.HelpLinks; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; @SuppressWarnings("serial") public class HelpButton extends JButton{ + /** + * The final size (width and height) of the help button in pixel, declared here for better code maintainability + */ private static final int SIZE = 16; + /** + * The default icon for the help button that should be shown if the button is not highlighted + */ private static final ImageIcon defaultIcon = GraphicsLoader.getInfoIcon(SIZE); + /** + * The icon tor the help button that should be shown if the button is highlighted + */ private static final ImageIcon hlIcon = GraphicsLoader.getInfoIconHL(SIZE); public HelpButton() { diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LanguageRenderer.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LanguageRenderer.java index 60b3b3b..2b2ca9f 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LanguageRenderer.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LanguageRenderer.java @@ -8,7 +8,7 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.ListCellRenderer; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; @SuppressWarnings("serial") class LanguageRenderer extends JPanel implements ListCellRenderer<Locale>{ diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LibStatusPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LibStatusPanel.java index 212cde9..dadb3ae 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LibStatusPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/LibStatusPanel.java @@ -25,7 +25,7 @@ import java.awt.Color; import javax.swing.JLabel; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; /** * Simple JLabel visually representing whether or not the Yoshiko Lib is loaded * diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/MainPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/MainPanel.java index 3c34e3a..d61f759 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/MainPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/MainPanel.java @@ -52,12 +52,12 @@ import org.cytoscape.work.TaskIterator; import de.hhu.ba.yoshikoWrapper.core.AlgorithmTask; import de.hhu.ba.yoshikoWrapper.core.CyCore; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.Hint; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.core.ParameterSet; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; import de.hhu.ba.yoshikoWrapper.swing.AboutDialogFactory; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.swing.HintManager; import de.hhu.ba.yoshikoWrapper.swing.LanguageSwitcherPanelFactory; import de.hhu.ba.yoshikoWrapper.swing.LibraryPanelFactory; diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ResultPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ResultPanel.java index 226f87a..e947931 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ResultPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/ResultPanel.java @@ -40,10 +40,10 @@ import org.cytoscape.application.swing.CytoPanelName; import org.cytoscape.util.swing.BasicCollapsiblePanel; import de.hhu.ba.yoshikoWrapper.core.CyCore; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoResult; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoSolution; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.swing.SwingUtil; /**Swing component that contains ALL solutions that are found during one run. diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/YoshikoHeader.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/YoshikoHeader.java index f484334..4a43e82 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/YoshikoHeader.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/swing/components/YoshikoHeader.java @@ -27,7 +27,7 @@ import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; -import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; +import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader; @SuppressWarnings("serial") public class YoshikoHeader extends JPanel { diff --git a/src/main/resources/YoshikoStrings.properties b/src/main/resources/YoshikoStrings.properties index 2ad94d1..7b0e8d0 100644 --- a/src/main/resources/YoshikoStrings.properties +++ b/src/main/resources/YoshikoStrings.properties @@ -71,6 +71,7 @@ status_reductionMR = Applying "Merging" reduction rule status_reductionPD = Applying "Parameter-Dependent" reduction rule status_reductionSN = Applying "Similar-Neighborhood" reduction rule +status_solvingILP = Solving ILP switchLanguage = Plugin language timeLimitILP = Use time limit for ILP (s): diff --git a/thesis/tex/Chapter/dm_impl.tex b/thesis/tex/Chapter/dm_impl.tex index f190adc..086cfec 100644 --- a/thesis/tex/Chapter/dm_impl.tex +++ b/thesis/tex/Chapter/dm_impl.tex @@ -2,7 +2,7 @@ The Yoshiko Wrapper provides a clean and simple interface to generate the model. \subparagraph{Mapping edge costs} The user has the possibility to use a numeric Cytoscape column of the node table as a source for the edge-cost function $C$. \subparagraph{Insertion and deletion cost} -The default values $C_I$ and $C_D$ can be set by the user and default to $C_I=-1$ and $C_D=1$. +The default values $C_I$ and $C_D$ can be set by the user with the default values being $C_I=-1$ and $C_D=1$. It should be noted, that the insertion cost value is not normalized or in any way adjusted when a mapping is used. This means that the user needs to adjust this value wisely to fit the data. As an example the user might have mapped the edge costs to a column containing values in the range of $10^6-10^7$. The default insertion cost of $-1$ will be irrelevant in comparison and the algorithm will most likely insert all missing edges and generate one big cluster as a solution. diff --git a/thesis/tex/Thesis.pdf b/thesis/tex/Thesis.pdf index 7b6bcf5b1fdd5424a288ea8ce0b3d40da9e427ee..7e2abacb398116dcf8541d79ef4f836411f08309 100644 GIT binary patch delta 2423 zcmbO^hhzR6jtxI}nM@3(E6!rns6Q$Z+yBJmQ*E8AoUu^upIr94b6L3Od{b#@sB}Ew zyzKEyzS(|hlT9`sUcda*(<PJNtzo$9`F)Dl&NoH1;WN|Qd(!{!d;IeE(ZhF_$7|0Q zU9;g*8o&R{0M_DLX?@XZDHCl&Zu<W;fBL!juH3uwD6z^Fe2j|o-|tS8c~@Wg<NWgY z`t^MeSU+E5Y~JznA;*(bEC1NE%v+Fbsi5$=Fsgdr{ez8n4X*T;2KRse@Yzc{+5ElQ zf+halCeMRkytY-mx98mly_<d>XZHv&aD+)XZ<pAe7%wDl<F2`*w%Bef$Ll@SN-}rZ z8@6>X3H>E|`nZ}v=AK=PvJa%cIQQ31*S7TURl^nat7TVd3eLIxH=<nkCC|Ewz*$0F zl`GYk?%f%>Iyr7-=G=?FPL)`*niV^xT4&DC*9qL0>-cu!OF!+I({o)JI@CTrt5g4E zu(m7XB5!ln;Wd-P*-Q(L1Xtz-n5BQd|E~A!>1Q%+yf1Acj);dJ;+z*5W-&q0OI;<R z=cSV5o40RmZR&#^wk&W=%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ErTN-2*%}>|3 za+xD^U+?Qb`GTPd&v>n?BAEXtyFXac+ix5rdiq`JF3U}hA%7;_xFEBfOZ$J>6=Akl ze9i0K>X~cpVpko#e|)Wid~^7No)3n9-Osk@GA@%Uk^Yy^c{Of*3q$rlzJKuvhLa2Z zgqx3xZa*%{xblmJp|P2<p|*jMx`BbZCYQc%eu_(CNveW|i<Oaqp}B#jfu$i>$@Ups zOa~c*OpHwoj7%MkTntUjolM*u4GdgNES=3=49zW^UCkYh>=bMWDv9ON_esr5FUe3a zvanD9w;5#5ZZ~6Q5NUW=E$pZwsJrWhi%aLd>TaRE(>>-S7x!IE`pBi$cYVXHJxxbj z)Hi4{|9t;xZv75dmnY{HA7!=ky<iFa>&Y3)tG?htgOmlEdWwUtOe43^LOwo4?oA6B z`3~?}K4^>){dn73|3`wbS%U001^!P98Mqd5Fa_|a25{A<25{Di`ri0i6w$~P(WaWw zrX`ww;aO7vf3HA$?u}N{j3zUVl|Sy~u4O%Rfh&3g^J;-cjS@%mFAn-&9PN1yDDWIK z=sB>$>%mRA-jzr4*BlF7H#tmLi~oDrWG#R3uwbqAajP?@u3vGrC+p3%tgx>}DW=P- zzNeY4|Meq#>w;fG3LCpt*3FC7J!GfyKxEQ{rp+edi}?I4dVe?nnpWQ+sx@!=H(n-1 N4s$M5RabvEE&wZOas~hZ diff --git a/thesis/tex/Thesis.tex b/thesis/tex/Thesis.tex index acc9667..720652e 100644 --- a/thesis/tex/Thesis.tex +++ b/thesis/tex/Thesis.tex @@ -23,9 +23,6 @@ \title{Developing and evaluating a Cytoscape app for graph-based clustering} - - - \begin{document} \maketitle @@ -50,4 +47,6 @@ \input{Chapter/dm_theory} \paragraph{Implementation} \input{Chapter/dm_impl} +\section{Evaluation of the Yoshiko Algorithm} +\section{Outlook} \end{document} \ No newline at end of file -- GitLab