Package net.maswag.falcaun
Class STLAbstractAtomic
- All Implemented Interfaces:
Function<IOSignal<List<Double>>,
,Double> TemporalLogic<List<Double>>
,TemporalLogic.STLCost
- Direct Known Subclasses:
STLInputAtomic
,STLOutputAtomic
public abstract class STLAbstractAtomic
extends AbstractTemporalLogic<List<Double>>
implements TemporalLogic.STLCost
STLAtomic class.
- Author:
- Masaki Waga <masakiwaga@gmail.com>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.maswag.falcaun.TemporalLogic
TemporalLogic.IOType, TemporalLogic.LTLFormula, TemporalLogic.STLCost
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
protected STLAbstractAtomic.Operation
protected int
Fields inherited from class net.maswag.falcaun.AbstractTemporalLogic
initialized, iOType, nonTemporal, satisfyingAtomicPropositions
-
Constructor Summary
ConstructorsConstructorDescriptionSTLAbstractAtomic
(int sigIndex, STLAbstractAtomic.Operation op, double comparator) Constructor for STLAtomic. -
Method Summary
Modifier and TypeMethodDescriptioncartesianProductCharacters
(List<Set<Character>> charList) Take the cartesian product of a list of sets of characters and return a set of strings by concatenating the characters.Construct the characters that represent the abstract values of the signal.protected void
constructAtomicStrings
(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest) constructEqAPs
(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) constructLargerAPs
(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) constructSmallerAPs
(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) decomposeMap
(Map<T, Double> map) Decomposes a map with value Doubles into a pair of lists of keys and Doubles.(package private) static <T> void
Decomposes a list of maps with value Doubles into a list of pair of lists of keys and Doubles.getRoSISingle
(net.automatalib.word.Word<List<Double>> signal) Returns the collection of atomic propositions such that if one of them is satisfied, the formula is satisfied.protected abstract String
Returns a string representation of the formula in the format of LTSMin.toString()
Methods inherited from class net.maswag.falcaun.AbstractTemporalLogic
equals, hashCode, makeAbstractStringWithAtomicStrings
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.maswag.falcaun.TemporalLogic
apply, constructSatisfyingAtomicPropositions, getAllAPs, getIOType, getRoSI, isInitialized, isNonTemporal, toLTLString
-
Field Details
-
op
-
sigIndex
protected int sigIndex -
comparator
protected double comparator -
allAPs
-
-
Constructor Details
-
STLAbstractAtomic
Constructor for STLAtomic.
- Parameters:
sigIndex
- a int.op
- aSTLAbstractAtomic.Operation
object.comparator
- a double.
-
-
Method Details
-
getAllAPs
-
getRoSISingle
-
getSignalName
-
toString
-
constructAtomicStrings
-
getSatisfyingAtomicPropositions
Description copied from interface:TemporalLogic
Returns the collection of atomic propositions such that if one of them is satisfied, the formula is satisfied. If there is no such collection, returns nullSuch a set exists if the formula does not contain any temporal operators.
- Specified by:
getSatisfyingAtomicPropositions
in interfaceTemporalLogic<List<Double>>
-
toAbstractString
Returns a string representation of the formula in the format of LTSMin.- Specified by:
toAbstractString
in interfaceTemporalLogic<List<Double>>
- Returns:
- a
String
object representing the formula in the format of LTSMin.
-
constructSmallerAPs
private Set<Character> constructSmallerAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) - Parameters:
concreteValues
- The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
-
constructLargerAPs
private Set<Character> constructLargerAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) - Parameters:
concreteValues
- The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
-
constructEqAPs
private Set<Character> constructEqAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold) - Parameters:
concreteValues
- The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
-
constructAllAPs
Set<Character> constructAllAPs(List<List<Character>> abstractValues, List<Character> largest, int index) Construct the characters that represent the abstract values of the signal.- Parameters:
abstractValues
- The list of the abstract values of each signal.largest
- The largest value of each signal. If the signal is output signal this value is used to construct the atomic propositions. If the signal is input signal this value must be empty.index
- The index of the signal
-
cartesianProductCharacters
@Nonnull public static Set<String> cartesianProductCharacters(@Nonnull List<Set<Character>> charList) Take the cartesian product of a list of sets of characters and return a set of strings by concatenating the characters.For example, if the input is [[a, b], [c, d]], the output will be {ac, ad, bc, bd}.
- Parameters:
charList
- a list of sets of characters- Returns:
- a set of concatenated character combinations
-
decomposeMap
Decomposes a map with value Doubles into a pair of lists of keys and Doubles.- Type Parameters:
T
- the type of the keys- Parameters:
map
- a map to Doubles- Returns:
- a pair of lists of keys and Doubles. The first element is a list of keys and the second element is a list of values. The returned lists are sorted in ascending order of the values.
-
decomposeMapList
static <T> void decomposeMapList(List<Map<T, Double>> maps, List<List<T>> keyLists, List<List<Double>> valueLists) Decomposes a list of maps with value Doubles into a list of pair of lists of keys and Doubles.- Type Parameters:
T
- the type of the keys- Parameters:
maps
- a list of maps to Doubles.keyLists
- a list of lists of keys. The contents of this list will be cleared.valueLists
- a list of lists of values. The contents of this list will be cleared.
-