Refactoring
* Upgraded to JUnit5 * Enhanced the tests for multiple instances of graphs * Save/Load test now pass * Changed the hierarchy of classes: - Graph is now the main Abstract class for the graphs - GraphDirected is an Abstract class for directed graph and inherits Graph - GraphUndirected is an Abstract class for undirected graph and inherits Graph * Changed how the Weight is represented in the graphs, removing the second parameter. From now on is only int. * Updated the implementations for MatrixGraph, ListGraph and MapGraph * Implemented only one undirected graph MatrixUndGraph * Added UnionFind and one implementation: QuickFind * Added MSF visit and implemented Kruskal and Prim (no tests) * Changed all the graphic components due to the deletion of the second parameter in the Graph class
This commit is contained in:
@@ -1 +1,54 @@
|
||||
{"gson":{"calls":{"threadLocalHashCode":865977613},"typeTokenCache":{"com.google.gson.reflect.TypeToken\u003c?\u003e":{},"com.google.gson.InstanceCreator\u003c?\u003e":{},"java.util.Map\u003ccom.google.gson.reflect.TypeToken\u003c?\u003e, com.google.gson.TypeAdapter\u003c?\u003e\u003e":{},"java.lang.Class\u003c?\u003e":{},"com.google.gson.internal.reflect.ReflectionAccessor":{},"com.google.gson.internal.ConstructorConstructor":{},"java.util.List\u003ccom.google.gson.ExclusionStrategy\u003e":{},"com.google.gson.internal.Excluder":{},"java.util.Map\u003cjava.lang.reflect.Type, com.google.gson.InstanceCreator\u003c?\u003e\u003e":{},"com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory":{},"berack96.lib.graph.models.EdgeSaveStructure":{},"berack96.lib.graph.models.EdgeSaveStructure[]":{},"java.util.List\u003ccom.google.gson.TypeAdapterFactory\u003e":{},"com.google.gson.FieldNamingStrategy":{},"com.google.gson.Gson":{},"double":{},"java.lang.String":{},"java.lang.String[]":{},"java.lang.reflect.Type":{},"int":{},"com.google.gson.ExclusionStrategy":{},"com.google.gson.TypeAdapter\u003c?\u003e":{},"java.lang.Integer":{},"com.google.gson.TypeAdapterFactory":{},"java.lang.ThreadLocal\u003cjava.util.Map\u003ccom.google.gson.reflect.TypeToken\u003c?\u003e, com.google.gson.Gson$FutureTypeAdapter\u003c?\u003e\u003e\u003e":{},"boolean":{},"com.google.gson.LongSerializationPolicy":{},"berack96.lib.graph.models.GraphSaveStructure":{}},"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}},"jsonAdapterFactory":{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}}},"factories":[null,null,{"version":-1.0,"modifiers":136,"serializeInnerClasses":true,"requireExpose":false,"serializationStrategies":[],"deserializationStrategies":[]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}}},{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}},"complexMapKeySerialization":false},{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}}},null,{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}},"fieldNamingPolicy":"IDENTITY","excluder":{"version":-1.0,"modifiers":136,"serializeInnerClasses":true,"requireExpose":false,"serializationStrategies":[],"deserializationStrategies":[]},"jsonAdapterFactory":{"constructorConstructor":{"instanceCreators":{},"accessor":{"theUnsafe":{}}}},"accessor":{"theUnsafe":{}}}],"excluder":{"version":-1.0,"modifiers":136,"serializeInnerClasses":true,"requireExpose":false,"serializationStrategies":[],"deserializationStrategies":[]},"fieldNamingStrategy":"IDENTITY","instanceCreators":{},"serializeNulls":false,"complexMapKeySerialization":false,"generateNonExecutableJson":false,"htmlSafe":true,"prettyPrinting":false,"lenient":false,"serializeSpecialFloatingPointValues":false,"dateStyle":2,"timeStyle":2,"longSerializationPolicy":"DEFAULT","builderFactories":[],"builderHierarchyFactories":[]},"vertices":["\"1\"","\"2\"","\"3\"","\"4\"","\"5\"","\"6\"","\"7\"","\"8\""],"edges":[{"src":"\"1\"","dest":"\"2\"","weight":"1"},{"src":"\"1\"","dest":"\"3\"","weight":"1"},{"src":"\"5\"","dest":"\"4\"","weight":"5"},{"src":"\"6\"","dest":"\"2\"","weight":"2"},{"src":"\"5\"","dest":"\"3\"","weight":"2"},{"src":"\"8\"","dest":"\"7\"","weight":"9"},{"src":"\"4\"","dest":"\"6\"","weight":"6"},{"src":"\"2\"","dest":"\"5\"","weight":"4"}]}
|
||||
{
|
||||
"vertices": [
|
||||
"\"6\"",
|
||||
"\"5\"",
|
||||
"\"4\"",
|
||||
"\"3\"",
|
||||
"\"2\"",
|
||||
"\"1\"",
|
||||
"\"8\"",
|
||||
"\"7\""
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"src": "\"4\"",
|
||||
"dest": "\"6\"",
|
||||
"weight": 6
|
||||
},
|
||||
{
|
||||
"src": "\"2\"",
|
||||
"dest": "\"5\"",
|
||||
"weight": 4
|
||||
},
|
||||
{
|
||||
"src": "\"5\"",
|
||||
"dest": "\"4\"",
|
||||
"weight": 5
|
||||
},
|
||||
{
|
||||
"src": "\"5\"",
|
||||
"dest": "\"3\"",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"src": "\"1\"",
|
||||
"dest": "\"3\"",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"src": "\"6\"",
|
||||
"dest": "\"2\"",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"src": "\"1\"",
|
||||
"dest": "\"2\"",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"src": "\"8\"",
|
||||
"dest": "\"7\"",
|
||||
"weight": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user