X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fquery_tree.mli;h=130d7cba2c41071741a90a1e06e864b9fa06ee9d;hb=22cf9c6f33dfad88aa57e58c132bef1459768210;hp=e578beb2c0b04d71a786a5f9469059770cd752b6;hpb=11fd750e5f19e421768ec72c511b631e7b009365;p=tatoo.git diff --git a/src/query_tree.mli b/src/query_tree.mli index e578beb..130d7cb 100644 --- a/src/query_tree.mli +++ b/src/query_tree.mli @@ -1,11 +1,7 @@ -val compteur : int ref +val query_tree_size : int ref +(**the size of query_tree*) -val all_nodes : Naive_tree.t -> Naive_tree.node list -(** [all_nodes t] returns all the nodes in the tree [t]. - Returns an empty list if there are no nodes in the tree. - *) - -val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Naive_tree.node list +val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Bitvector.t (** [element_by_tag t tag] returns all the nodes whose tag equal to [tag] in the tree [t]. *) val compile_single_path : Xpath.Ast.single_path -> Table.query_tree @@ -16,25 +12,14 @@ val compile_single_path : Xpath.Ast.single_path -> Table.query_tree val compile_xpath : Xpath.Ast.path -> Table.query_tree (** [compile_xpath path] returns un query_tree built with [xpath] *) -(* -val union_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list -(** union two lists without duplicating -*) -val inter_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list -(** make a list without duplicating by using the intersection of two lists -*) - -val diff_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list -(** difference two lists without duplicating +val minimize_qtree : Table.query_tree -> Table.query_tree +(** [minimize_qtree q] returns the minimum query_tree of [q] + [q] query_tree *) -val eval_query_tree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list -(** [eval_query_tree tree start q] returns the set of nodes that evaluate by the query_tree [q]. +val eval_qtree : Naive_tree.t -> Bitvector.t ->Table.query_tree -> Bitvector.t +(** [eval_qtree tree start q] returns the set of nodes that evaluate by the query_tree [q]. [start] the set of nodes departing. [q] query_tree *) -*) -val minimize_qtree : Table.query_tree -> Table.query_tree - -val eval_qtree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list