Commit 5dbb665d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph] add _camera_angle

parent 924aeb1c
Pipeline #3429 passed with stage
in 91 minutes and 43 seconds
...@@ -105,7 +105,7 @@ instance ToSchema MultiPartite where ...@@ -105,7 +105,7 @@ instance ToSchema MultiPartite where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_multipartite_") declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_multipartite_")
makeLenses ''MultiPartite makeLenses ''MultiPartite
defaultMultipartite :: MultiPartite defaultMultipartite :: MultiPartite
defaultMultipartite = MultiPartite a a defaultMultipartite = MultiPartite a a
where where
a = Partite HashSet.empty NgramsTerms a = Partite HashSet.empty NgramsTerms
...@@ -203,7 +203,8 @@ data GraphV3 = GraphV3 { go_links :: [EdgeV3] ...@@ -203,7 +203,8 @@ data GraphV3 = GraphV3 { go_links :: [EdgeV3]
$(deriveJSON (unPrefix "go_") ''GraphV3) $(deriveJSON (unPrefix "go_") ''GraphV3)
----------------------------------------------------------- -----------------------------------------------------------
data Camera = Camera { _camera_ratio :: Double data Camera = Camera { _camera_angle :: Double
, _camera_ratio :: Double
, _camera_x :: Double , _camera_x :: Double
, _camera_y :: Double } , _camera_y :: Double }
deriving (Show, Generic) deriving (Show, Generic)
...@@ -222,7 +223,7 @@ $(deriveJSON (unPrefix "_") ''HyperdataGraph) ...@@ -222,7 +223,7 @@ $(deriveJSON (unPrefix "_") ''HyperdataGraph)
instance ToSchema HyperdataGraph where instance ToSchema HyperdataGraph where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_") declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_")
defaultHyperdataGraph :: HyperdataGraph defaultHyperdataGraph :: HyperdataGraph
defaultHyperdataGraph = HyperdataGraph Nothing Nothing defaultHyperdataGraph = HyperdataGraph Nothing Nothing
......
...@@ -194,7 +194,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2) ...@@ -194,7 +194,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2)
lIds <- selectNodesWithUsername NodeList userMaster lIds <- selectNodesWithUsername NodeList userMaster
-- Getting the Ngrams to compute with and grouping it according to the lists -- Getting the Ngrams to compute with and grouping it according to the lists
let let
groupedContextsByNgrams nt corpusId' (lists_master, lists_user) = do groupedContextsByNgrams nt corpusId' (lists_master, lists_user) = do
let let
ngs = filterListWithRoot [MapTerm] $ mapTermListRoot lists_user nt repo ngs = filterListWithRoot [MapTerm] $ mapTermListRoot lists_user nt repo
...@@ -205,7 +205,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2) ...@@ -205,7 +205,7 @@ computeGraph corpusId partitionMethod bridgeMethod similarity strength (nt1,nt2)
(m1,m2) <- do (m1,m2) <- do
m1 <- groupedContextsByNgrams nt1 corpusId (lIds, [lId]) m1 <- groupedContextsByNgrams nt1 corpusId (lIds, [lId])
if nt1 == nt2 if nt1 == nt2
then then
pure (m1,m1) pure (m1,m1)
else do else do
m2 <- groupedContextsByNgrams nt2 corpusId (lIds, [lId]) m2 <- groupedContextsByNgrams nt2 corpusId (lIds, [lId])
...@@ -369,4 +369,3 @@ getGraphGexf :: FlowCmdM env err m ...@@ -369,4 +369,3 @@ getGraphGexf :: FlowCmdM env err m
getGraphGexf uId nId = do getGraphGexf uId nId = do
HyperdataGraphAPI { _hyperdataAPIGraph = graph } <- getGraph uId nId HyperdataGraphAPI { _hyperdataAPIGraph = graph } <- getGraph uId nId
pure $ addHeader "attachment; filename=graph.gexf" graph pure $ addHeader "attachment; filename=graph.gexf" graph
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment