99use std:: collections:: BTreeMap ;
1010use std:: sync:: Arc ;
1111
12+ #[ allow( unused_imports) ]
1213use either:: { Left , Right } ;
14+ #[ cfg( feature = "graph-algo" ) ]
1315use graph:: prelude:: { CsrLayout , DirectedCsrGraph , GraphBuilder } ;
1416use lazy_static:: lazy_static;
17+ #[ allow( unused_imports) ]
1518use miette:: { bail, ensure, Diagnostic , Report , Result } ;
1619use smartstring:: { LazyCompact , SmartString } ;
1720use thiserror:: Error ;
@@ -25,49 +28,14 @@ use crate::data::symb::Symbol;
2528use crate :: data:: tuple:: TupleIter ;
2629use crate :: data:: value:: DataValue ;
2730#[ cfg( feature = "graph-algo" ) ]
28- use crate :: fixed_rule:: algos:: all_pairs_shortest_path:: {
29- BetweennessCentrality , ClosenessCentrality ,
30- } ;
31- #[ cfg( feature = "graph-algo" ) ]
32- use crate :: fixed_rule:: algos:: astar:: ShortestPathAStar ;
33- #[ cfg( feature = "graph-algo" ) ]
34- use crate :: fixed_rule:: algos:: bfs:: Bfs ;
35- #[ cfg( feature = "graph-algo" ) ]
36- use crate :: fixed_rule:: algos:: degree_centrality:: DegreeCentrality ;
37- #[ cfg( feature = "graph-algo" ) ]
38- use crate :: fixed_rule:: algos:: dfs:: Dfs ;
39- #[ cfg( feature = "graph-algo" ) ]
40- use crate :: fixed_rule:: algos:: kruskal:: MinimumSpanningForestKruskal ;
41- #[ cfg( feature = "graph-algo" ) ]
42- use crate :: fixed_rule:: algos:: label_propagation:: LabelPropagation ;
43- #[ cfg( feature = "graph-algo" ) ]
44- use crate :: fixed_rule:: algos:: louvain:: CommunityDetectionLouvain ;
45- #[ cfg( feature = "graph-algo" ) ]
46- use crate :: fixed_rule:: algos:: pagerank:: PageRank ;
47- #[ cfg( feature = "graph-algo" ) ]
48- use crate :: fixed_rule:: algos:: prim:: MinimumSpanningTreePrim ;
49- #[ cfg( feature = "graph-algo" ) ]
50- use crate :: fixed_rule:: algos:: shortest_path_bfs:: ShortestPathBFS ;
51- #[ cfg( feature = "graph-algo" ) ]
52- use crate :: fixed_rule:: algos:: shortest_path_dijkstra:: ShortestPathDijkstra ;
53- #[ cfg( feature = "graph-algo" ) ]
54- use crate :: fixed_rule:: algos:: strongly_connected_components:: StronglyConnectedComponent ;
55- #[ cfg( feature = "graph-algo" ) ]
56- use crate :: fixed_rule:: algos:: top_sort:: TopSort ;
57- #[ cfg( feature = "graph-algo" ) ]
58- use crate :: fixed_rule:: algos:: triangles:: ClusteringCoefficients ;
59- #[ cfg( feature = "graph-algo" ) ]
60- use crate :: fixed_rule:: algos:: yen:: KShortestPathYen ;
61- use crate :: fixed_rule:: utilities:: constant:: Constant ;
62- use crate :: fixed_rule:: utilities:: csv:: CsvReader ;
63- use crate :: fixed_rule:: utilities:: jlines:: JsonReader ;
64- use crate :: fixed_rule:: utilities:: random_walk:: RandomWalk ;
65- use crate :: fixed_rule:: utilities:: reorder_sort:: ReorderSort ;
31+ use crate :: fixed_rule:: algos:: * ;
32+ use crate :: fixed_rule:: utilities:: * ;
6633use crate :: parse:: SourceSpan ;
6734use crate :: runtime:: db:: Poison ;
6835use crate :: runtime:: temp_store:: { EpochStore , RegularTempStore } ;
6936use crate :: runtime:: transact:: SessionTx ;
7037
38+ #[ cfg( feature = "graph-algo" ) ]
7139pub ( crate ) mod algos;
7240pub ( crate ) mod utilities;
7341
@@ -138,6 +106,7 @@ impl<'a, 'b> FixedRuleInputRelation<'a, 'b> {
138106 pub fn span ( & self ) -> SourceSpan {
139107 self . arg_manifest . span ( )
140108 }
109+ #[ cfg( feature = "graph-algo" ) ]
141110 pub fn to_directed_graph (
142111 & self ,
143112 undirected : bool ,
@@ -203,7 +172,7 @@ impl<'a, 'b> FixedRuleInputRelation<'a, 'b> {
203172 }
204173 Ok ( ( graph, indices, inv_indices) )
205174 }
206-
175+ # [ cfg ( feature = "graph-algo" ) ]
207176 pub fn to_directed_weighted_graph (
208177 & self ,
209178 undirected : bool ,
0 commit comments