Gecoder C0 Coverage Information - RCov

lib/gecoder/interface/constraints/bool_enum/relation.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/gecoder/interface/constraints/bool_enum/relation.rb 55 34
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 module Gecode::BoolEnum
2   module BoolEnumOperand
3     # Produces a BoolOperand that represents the conjunction (AND) of all
4     # boolean operands in this enumeration.
5     #
6     # ==== Examples 
7     #
8     #   # Conjunction of all elements in +bool_enum+.
9     #   bool_enum.conjunction
10     def conjunction
11       Relation::BoolEnumConjunctionOperand.new(@model, self)
12     end
13     
14     # Produces a BoolOperand that represents the disjunction (OR) of all
15     # boolean operands in this enumeration.
16     #
17     # ==== Examples 
18     #
19     #   # Disjunction of all elements in +bool_enum+.
20     #   bool_enum.disjunction
21     def disjunction
22       Relation::BoolEnumDisjunctionOperand.new(@model, self)
23     end
24   end
25 
26   # A module that gathers the classes and modules used by boolean enumeration 
27   # relation constraints.
28   module Relation #:nodoc:
29     class BoolEnumConjunctionOperand < Gecode::Bool::ShortCircuitEqualityOperand #:nodoc:
30       def initialize(model, bool_enum)
31         super model
32         @enum = bool_enum
33       end
34 
35       def constrain_equal(bool_operand, constrain_domain, propagation_options)
36         Gecode::Raw::rel(@model.active_space, Gecode::Raw::BOT_AND,
37           @enum.to_bool_enum.bind_array, bool_operand.to_bool_var.bind, 
38           *propagation_options)
39       end
40     end
41     
42     class BoolEnumDisjunctionOperand < Gecode::Bool::ShortCircuitEqualityOperand #:nodoc:
43       def initialize(model, bool_enum)
44         super model
45         @enum = bool_enum
46       end
47 
48       def constrain_equal(bool_operand, constrain_domain, propagation_options)
49         Gecode::Raw::rel(@model.active_space, Gecode::Raw::BOT_OR,
50           @enum.to_bool_enum.bind_array, bool_operand.to_bool_var.bind, 
51           *propagation_options)
52       end
53     end
54   end
55 end

Generated on Thu Jan 08 13:27:03 +0100 2015 with rcov 1.0.0