Ignore:
Timestamp:
09/05/14 20:20:29 (10 years ago)
Author:
rkrimmel
Message:

Added automatically created javadoc, still needs to be commented properly though

Location:
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DifferenceSubstitutionMatrix.java

    r1733 r1734  
    99import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    1010 
     11// TODO: Auto-generated Javadoc 
    1112/** 
     13 * The Class DifferenceSubstitutionMatrix. 
     14 * 
    1215 * @author Ralph Krimmel 
    13  * 
    1416 */ 
    1517public class DifferenceSubstitutionMatrix implements SubstitutionMatrix { 
    1618 
     19        /** The input1. */ 
    1720        private final int[] input1; 
     21         
     22        /** The input2. */ 
    1823        private final int[] input2; 
     24         
     25        /** The max value. */ 
    1926        private final int maxValue; 
    2027 
     28        /** 
     29         * Instantiates a new difference substitution matrix. 
     30         * 
     31         * @param input1 the input1 
     32         * @param input2 the input2 
     33         */ 
    2134        public DifferenceSubstitutionMatrix(int[] input1, int[] input2) { 
    2235                this.input1 = input1; 
     
    2538        } 
    2639 
     40        /* (non-Javadoc) 
     41         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet) 
     42         */ 
    2743        @Override 
    2844        public void generate(HashSet<ITask> uniqueTasks) { 
    2945        } 
    3046 
     47        /* (non-Javadoc) 
     48         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty() 
     49         */ 
    3150        @Override 
    3251        public float getGapPenalty() { 
     
    3453        } 
    3554 
     55        /** 
     56         * Gets the max value. 
     57         * 
     58         * @return the max value 
     59         */ 
    3660        private int getMaxValue() { 
    3761                int max = input1[0]; 
     
    6185        } 
    6286 
     87        /* (non-Javadoc) 
     88         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList) 
     89         */ 
    6390        @Override 
    6491        public void update(LinkedList<ITask> newlyGeneratedTasks) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DummySubstitutionMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     
    69import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    710 
     11// TODO: Auto-generated Javadoc 
     12/** 
     13 * The Class DummySubstitutionMatrix. 
     14 */ 
    815public class DummySubstitutionMatrix implements SubstitutionMatrix { 
    916 
     17        /* (non-Javadoc) 
     18         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet) 
     19         */ 
    1020        @Override 
    1121        public void generate(HashSet<ITask> uniqueTasks) { 
    1222        } 
    1323 
     24        /* (non-Javadoc) 
     25         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty() 
     26         */ 
    1427        @Override 
    1528        public float getGapPenalty() { 
     
    1730        } 
    1831 
     32        /* (non-Javadoc) 
     33         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getScore(int, int) 
     34         */ 
    1935        @Override 
    2036        public float getScore(int pos1, int pos2) { 
     
    2642        } 
    2743 
     44        /* (non-Javadoc) 
     45         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList) 
     46         */ 
    2847        @Override 
    2948        public void update(LinkedList<ITask> newlyGeneratedTasks) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DynamicTriangleMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
    36import java.util.ArrayList; 
    47 
     8// TODO: Auto-generated Javadoc 
    59//Must be initialized! 
     10/** 
     11 * The Class DynamicTriangleMatrix. 
     12 */ 
    613public class DynamicTriangleMatrix implements ITriangleMatrix { 
    714 
     15        /** The matrix. */ 
    816        private final ArrayList<Float> matrix; 
     17         
     18        /** The size. */ 
    919        protected int size; 
     20         
     21        /** The initalization value. */ 
    1022        private float initalizationValue; 
    1123 
     24        /** 
     25         * Instantiates a new dynamic triangle matrix. 
     26         * 
     27         * @param size the size 
     28         */ 
    1229        public DynamicTriangleMatrix(int size) { 
    1330                this.size = size; 
     
    8198        } 
    8299 
     100        /* (non-Javadoc) 
     101         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#size() 
     102         */ 
    83103        @Override 
    84104        public int size() { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/EventTaskInstancesListGenerator.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     
    710import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 
    811 
     12// TODO: Auto-generated Javadoc 
     13/** 
     14 * The Class EventTaskInstancesListGenerator. 
     15 */ 
    916public class EventTaskInstancesListGenerator extends 
    1017                DefaultTaskTraversingVisitor { 
    1118 
     19        /** The eventlist. */ 
    1220        private LinkedList<IEventTaskInstance> eventlist; 
    1321 
     22        /** 
     23         * Instantiates a new event task instances list generator. 
     24         */ 
    1425        public EventTaskInstancesListGenerator() { 
    1526                eventlist = new LinkedList<IEventTaskInstance>(); 
    1627        } 
    1728 
     29        /** 
     30         * Gets the eventlist. 
     31         * 
     32         * @return the eventlist 
     33         */ 
    1834        public LinkedList<IEventTaskInstance> getEventlist() { 
    1935                return eventlist; 
    2036        } 
    2137 
     38        /** 
     39         * Sets the eventlist. 
     40         * 
     41         * @param eventlist the new eventlist 
     42         */ 
    2243        public void setEventlist(LinkedList<IEventTaskInstance> eventlist) { 
    2344                this.eventlist = eventlist; 
    2445        } 
    2546 
     47        /* (non-Javadoc) 
     48         * @see de.ugoe.cs.autoquest.tasktrees.treeifc.DefaultTaskTraversingVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask) 
     49         */ 
    2650        @Override 
    2751        public void visit(IEventTask eventTask) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ITriangleMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     6// TODO: Auto-generated Javadoc 
     7/** 
     8 * The Interface ITriangleMatrix. 
     9 */ 
    310public interface ITriangleMatrix { 
    411 
     12        /** 
     13         * Gets the. 
     14         * 
     15         * @param first the first 
     16         * @param second the second 
     17         * @return the float 
     18         */ 
    519        public abstract float get(int first, int second); 
    620 
    721        // Increases the size 
     22        /** 
     23         * Increase size. 
     24         * 
     25         * @param count the count 
     26         * @throws Exception the exception 
     27         */ 
    828        public abstract void increaseSize(int count) throws Exception; 
    929 
     30        /** 
     31         * Initialize. 
     32         * 
     33         * @param value the value 
     34         */ 
    1035        public abstract void initialize(float value); 
    1136 
     37        /** 
     38         * Sets the. 
     39         * 
     40         * @param first the first 
     41         * @param second the second 
     42         * @param value the value 
     43         */ 
    1244        public abstract void set(int first, int second, float value); 
    1345 
     46        /** 
     47         * Size. 
     48         * 
     49         * @return the int 
     50         */ 
    1451        public abstract int size(); 
    1552 
     53        /** 
     54         * To string. 
     55         * 
     56         * @return the string 
     57         */ 
    1658        @Override 
    1759        public abstract String toString(); 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/NearbySubstitutionMatrix.java

    r1733 r1734  
    99import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    1010 
     11// TODO: Auto-generated Javadoc 
    1112/** 
     13 * The Class NearbySubstitutionMatrix. 
     14 * 
    1215 * @author Ralph Krimmel 
    13  * 
    1416 */ 
    1517public class NearbySubstitutionMatrix implements SubstitutionMatrix { 
    1618 
     19        /** The input1. */ 
    1720        private final int[] input1; 
     21         
     22        /** The input2. */ 
    1823        private final int[] input2; 
     24         
     25        /** The range. */ 
    1926        private final int range; 
    2027 
     28        /** 
     29         * Instantiates a new nearby substitution matrix. 
     30         * 
     31         * @param input1 the input1 
     32         * @param input2 the input2 
     33         * @param range the range 
     34         */ 
    2135        public NearbySubstitutionMatrix(int[] input1, int[] input2, int range) { 
    2236                this.input1 = input1; 
     
    2539        } 
    2640 
     41        /* (non-Javadoc) 
     42         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet) 
     43         */ 
    2744        @Override 
    2845        public void generate(HashSet<ITask> uniqueTasks) { 
    2946        } 
    3047 
     48        /* (non-Javadoc) 
     49         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty() 
     50         */ 
    3151        @Override 
    3252        public float getGapPenalty() { 
     
    5171        } 
    5272 
     73        /* (non-Javadoc) 
     74         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList) 
     75         */ 
    5376        @Override 
    5477        public void update(LinkedList<ITask> newlyGeneratedTasks) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     
    1720import de.ugoe.cs.util.console.Console; 
    1821 
     22// TODO: Auto-generated Javadoc 
     23/** 
     24 * The Class ObjectDistanceSubstitionMatrix. 
     25 */ 
    1926public class ObjectDistanceSubstitionMatrix implements SubstitutionMatrix, 
    2027                Serializable { 
    2128 
    22         /** 
    23          *  
    24          */ 
     29        /** The Constant serialVersionUID. */ 
    2530        private static final long serialVersionUID = -4253258274617754083L; 
     31         
     32        /** The idmapping. */ 
    2633        private final HashMap<Integer, Integer> idmapping; 
     34         
     35        /** The matrix. */ 
    2736        private ITriangleMatrix matrix; 
     37         
     38        /** The unique tasks. */ 
    2839        private HashSet<ITask> uniqueTasks; 
     40         
     41        /** The gap penalty. */ 
    2942        private float gapPenalty; 
     43         
     44        /** The index. */ 
    3045        private int index = 0; 
     46         
     47        /** The etis of tasks. */ 
    3148        private final HashMap<Integer, LinkedList<IEventTaskInstance>> etisOfTasks; 
     49         
     50        /** The calculate non task instances. */ 
    3251        private boolean calculateNonTaskInstances = true; 
     52         
     53        /** The first round max index. */ 
    3354        private int firstRoundMaxIndex = 0; 
    3455 
     56        /** The positive threshold. */ 
    3557        private final double positiveThreshold; 
    3658 
     59        /** 
     60         * Instantiates a new object distance substition matrix. 
     61         * 
     62         * @param positiveThreshold the positive threshold 
     63         * @param gapPenalty the gap penalty 
     64         * @param calculateNonTaskInstances the calculate non task instances 
     65         */ 
    3766        public ObjectDistanceSubstitionMatrix(float positiveThreshold, 
    3867                        int gapPenalty, boolean calculateNonTaskInstances) { 
     
    4574        } 
    4675 
     76        /** 
     77         * Compute distance. 
     78         * 
     79         * @param task1 the task1 
     80         * @param task2 the task2 
     81         */ 
    4782        private void computeDistance(ITask task1, ITask task2) { 
    4883                int index1 = -1; 
     
    92127        } 
    93128 
     129        /** 
     130         * Distance between instances. 
     131         * 
     132         * @param eti1 the eti1 
     133         * @param eti2 the eti2 
     134         * @return the float 
     135         */ 
    94136        private float distanceBetweenInstances(IEventTaskInstance eti1, 
    95137                        IEventTaskInstance eti2) { 
     
    101143        } 
    102144 
     145        /** 
     146         * Distance between task and instance. 
     147         * 
     148         * @param task1 the task1 
     149         * @param eti1 the eti1 
     150         * @return the float 
     151         */ 
    103152        private float distanceBetweenTaskAndInstance(ITask task1, 
    104153                        IEventTaskInstance eti1) { 
     
    127176        } 
    128177 
     178        /** 
     179         * Distance between tasks. 
     180         * 
     181         * @param task1 the task1 
     182         * @param task2 the task2 
     183         * @return the float 
     184         */ 
    129185        private float distanceBetweenTasks(ITask task1, ITask task2) { 
    130186                if (this.calculateNonTaskInstances) { 
     
    144200        } 
    145201 
     202        /* (non-Javadoc) 
     203         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet) 
     204         */ 
    146205        @Override 
    147206        public void generate(HashSet<ITask> uniqueTasks) { 
     
    174233        } 
    175234 
     235        /* (non-Javadoc) 
     236         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty() 
     237         */ 
    176238        @Override 
    177239        public float getGapPenalty() { 
     
    179241        } 
    180242 
     243        /** 
     244         * Gets the index. 
     245         * 
     246         * @param eti the eti 
     247         * @return the index 
     248         */ 
    181249        synchronized private int getIndex(IEventTaskInstance eti) { 
    182250                int tempindex = -1; 
     
    191259        } 
    192260 
     261        /** 
     262         * Gets the index. 
     263         * 
     264         * @param task the task 
     265         * @return the index 
     266         */ 
    193267        synchronized private int getIndex(ITask task) { 
    194268                int tempindex = -1; 
     
    211285        // } 
    212286 
     287        /* (non-Javadoc) 
     288         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getScore(int, int) 
     289         */ 
    213290        @Override 
    214291        public float getScore(int taskId1, int taskId2) { 
     
    230307 
    231308        // TODO: Merge this with updateEventTaskInstances 
     309        /** 
     310         * Search event task instances. 
     311         */ 
    232312        private void searchEventTaskInstances() { 
    233313                for (final Iterator<ITask> it = uniqueTasks.iterator(); it.hasNext();) { 
     
    243323        } 
    244324 
     325        /** 
     326         * Sets the gap penalty. 
     327         * 
     328         * @param gapPenalty the new gap penalty 
     329         */ 
    245330        public void setGapPenalty(float gapPenalty) { 
    246331                this.gapPenalty = gapPenalty; 
    247332        }; 
    248333 
     334        /* (non-Javadoc) 
     335         * @see java.lang.Object#toString() 
     336         */ 
    249337        @Override 
    250338        public String toString() { 
     
    253341 
    254342        // Just Calculate the distance between the new tasks and the matrix. 
     343        /* (non-Javadoc) 
     344         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList) 
     345         */ 
    255346        @Override 
    256347        public void update(LinkedList<ITask> newTasks) { 
     
    277368        } 
    278369 
     370        /** 
     371         * Update event task instances. 
     372         * 
     373         * @param newTasks the new tasks 
     374         */ 
    279375        public void updateEventTaskInstances(LinkedList<ITask> newTasks) { 
    280376                for (final Iterator<ITask> it = newTasks.iterator(); it.hasNext();) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/StaticTriangleMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
    36import java.io.Serializable; 
    47 
     8// TODO: Auto-generated Javadoc 
     9/** 
     10 * The Class StaticTriangleMatrix. 
     11 */ 
    512public class StaticTriangleMatrix implements ITriangleMatrix, Serializable { 
    613 
    7         /** 
    8          *  
    9          */ 
     14        /** The Constant serialVersionUID. */ 
    1015        private static final long serialVersionUID = 7599542322424894866L; 
     16         
     17        /** The matrix. */ 
    1118        private final float[] matrix; 
     19         
     20        /** The size. */ 
    1221        protected int size; 
    1322 
     23        /** 
     24         * Instantiates a new static triangle matrix. 
     25         * 
     26         * @param size the size 
     27         */ 
    1428        public StaticTriangleMatrix(int size) { 
    1529                this.size = size; 
     
    1731        } 
    1832 
     33        /* (non-Javadoc) 
     34         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#get(int, int) 
     35         */ 
    1936        @Override 
    2037        public float get(int first, int second) { 
     
    2542        } 
    2643 
     44        /* (non-Javadoc) 
     45         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#increaseSize(int) 
     46         */ 
    2747        @Override 
    2848        public void increaseSize(int count) throws Exception { 
     
    3252        } 
    3353 
     54        /* (non-Javadoc) 
     55         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#initialize(float) 
     56         */ 
    3457        @Override 
    3558        public void initialize(float value) { 
     
    3962        } 
    4063 
     64        /* (non-Javadoc) 
     65         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#set(int, int, float) 
     66         */ 
    4167        @Override 
    4268        public void set(int first, int second, float value) { 
     
    4672        } 
    4773 
     74        /* (non-Javadoc) 
     75         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#size() 
     76         */ 
    4877        @Override 
    4978        public int size() { 
     
    5180        } 
    5281 
     82        /* (non-Javadoc) 
     83         * @see java.lang.Object#toString() 
     84         */ 
    5385        @Override 
    5486        public String toString() { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/SubstitutionMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     
    69import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    710 
     11// TODO: Auto-generated Javadoc 
     12/** 
     13 * The Interface SubstitutionMatrix. 
     14 */ 
    815public interface SubstitutionMatrix { 
    916 
     17        /** 
     18         * Generate. 
     19         * 
     20         * @param uniqueTasks the unique tasks 
     21         */ 
    1022        public void generate(HashSet<ITask> uniqueTasks); 
    1123 
     24        /** 
     25         * Gets the gap penalty. 
     26         * 
     27         * @return the gap penalty 
     28         */ 
    1229        public float getGapPenalty(); 
    1330 
     31        /** 
     32         * Gets the score. 
     33         * 
     34         * @param pos1 the pos1 
     35         * @param pos2 the pos2 
     36         * @return the score 
     37         */ 
    1438        public float getScore(int pos1, int pos2); 
    1539 
     40        /** 
     41         * Update. 
     42         * 
     43         * @param newlyGeneratedTasks the newly generated tasks 
     44         */ 
    1645        public void update(LinkedList<ITask> newlyGeneratedTasks); 
    1746 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/UPGMAMatrix.java

    r1733 r1734  
     1/* 
     2 *  
     3 */ 
    14package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 
    25 
     6// TODO: Auto-generated Javadoc 
     7/** 
     8 * The Class UPGMAMatrix. 
     9 */ 
    310public class UPGMAMatrix extends StaticTriangleMatrix { 
    411 
     12        /** 
     13         * Instantiates a new UPGMA matrix. 
     14         * 
     15         * @param size the size 
     16         */ 
    517        public UPGMAMatrix(int size) { 
    618                super(size); 
    719        } 
    820 
     21        /* (non-Javadoc) 
     22         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.StaticTriangleMatrix#size() 
     23         */ 
    924        @Override 
    1025        public int size() { 
     
    1227        } 
    1328 
     29        /* (non-Javadoc) 
     30         * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.StaticTriangleMatrix#toString() 
     31         */ 
    1432        @Override 
    1533        public String toString() { 
Note: See TracChangeset for help on using the changeset viewer.