forked from strands-project/strands_qsr_lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqsr_rcc4.py
More file actions
26 lines (19 loc) · 795 Bytes
/
Copy pathqsr_rcc4.py
File metadata and controls
26 lines (19 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
from __future__ import print_function, division
from qsrlib_qsrs.qsr_rcc_abstractclass import QSR_RCC_Abstractclass
class QSR_RCC4(QSR_RCC_Abstractclass):
"""Computes symmetrical RCC4 relations"""
_unique_id = "rcc4"
_all_possible_relations = ("dc", "po", "pp", "ppi")
__mapping_from_rcc8 = {"dc": "dc",
"ec": "po",
"po": "po",
"tpp": "pp",
"ntpp": "pp",
"eq": "pp",
"tppi": "ppi",
"ntppi": "ppi"}
def __init__(self):
super(QSR_RCC4, self).__init__()
def _convert_to_requested_rcc_type(self, qsr):
return self.__mapping_from_rcc8[qsr]