diff options
author | 20001LastOrder <boqi.chen@mail.mcgill.ca> | 2020-11-04 01:16:22 -0500 |
---|---|---|
committer | 20001LastOrder <boqi.chen@mail.mcgill.ca> | 2020-11-04 01:16:22 -0500 |
commit | 93243cb3faf1ccd733081fcf380559ac03c9ad35 (patch) | |
tree | 421f9f174eb77c387b5acaa05f01e64a62cab3a7 /Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java | |
parent | add realistic solver (diff) | |
parent | Optimizing generator with linear objective functions (diff) | |
download | VIATRA-Generator-93243cb3faf1ccd733081fcf380559ac03c9ad35.tar.gz VIATRA-Generator-93243cb3faf1ccd733081fcf380559ac03c9ad35.tar.zst VIATRA-Generator-93243cb3faf1ccd733081fcf380559ac03c9ad35.zip |
merge with current master, comment numerical solver related logging
Diffstat (limited to 'Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java')
-rw-r--r-- | Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java new file mode 100644 index 00000000..eeb6e48f --- /dev/null +++ b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/statecoding/TheStateCoderFactory.java | |||
@@ -0,0 +1,40 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2015, Andras Szabolcs Nagy and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package org.eclipse.viatra.dse.statecoding; | ||
10 | |||
11 | import org.eclipse.viatra.dse.statecode.IStateCoder; | ||
12 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory; | ||
13 | |||
14 | public class TheStateCoderFactory implements IStateCoderFactory { | ||
15 | |||
16 | private StatecodingDependencyGraph sdg; | ||
17 | private IObjectsProviderFactory objectProviderFactory; | ||
18 | |||
19 | public TheStateCoderFactory(StatecodingDependencyGraph sdg) { | ||
20 | this(sdg, new IncrementalObjectProviderFactory()); | ||
21 | } | ||
22 | |||
23 | public TheStateCoderFactory(StatecodingDependencyGraph sdg, IObjectsProviderFactory objectProviderFactory) { | ||
24 | this.sdg = sdg; | ||
25 | this.objectProviderFactory = objectProviderFactory; | ||
26 | |||
27 | // TODO cyclic dependency? - exception | ||
28 | |||
29 | // TODO make plan for traversal | ||
30 | |||
31 | // TODO If the type is FIXED and all dependency is FIXED then do not create state code for it (them) | ||
32 | // This is not true :( e.g. matchmaking - they are fixed, but the references must be encoded | ||
33 | } | ||
34 | |||
35 | @Override | ||
36 | public IStateCoder createStateCoder() { | ||
37 | return new TheStateCoder(sdg, objectProviderFactory.createObjectsProvider()); | ||
38 | } | ||
39 | |||
40 | } | ||