3 instantiations of Vertex
System.Data.Entity (3)
System\Data\Common\Utils\Boolean\Solver.cs (1)
127
Vertex result = new
Vertex
(variable, children);
System\Data\Common\Utils\Boolean\Vertex.cs (2)
65
internal static readonly Vertex One = new
Vertex
();
70
internal static readonly Vertex Zero = new
Vertex
();
119 references to Vertex
System.Data.Entity (119)
System\Data\Common\Utils\Boolean\ConversionContext.cs (19)
33
internal abstract
Vertex
TranslateTermToVertex(TermExpr<T_Identifier> term);
39
internal abstract IEnumerable<LiteralVertexPair<T_Identifier>> GetSuccessors(
Vertex
vertex);
47
internal readonly
Vertex
Vertex;
50
internal LiteralVertexPair(
Vertex
vertex, Literal<T_Identifier> literal)
65
internal override
Vertex
TranslateTermToVertex(TermExpr<T_Identifier> term)
76
internal override IEnumerable<LiteralVertexPair<T_Identifier>> GetSuccessors(
Vertex
vertex)
81
Vertex
then = vertex.Children[0];
82
Vertex
@else = vertex.Children[1];
122
internal override
Vertex
TranslateTermToVertex(TermExpr<DomainConstraint<T_Variable, T_Element>> term)
131
return
Vertex
.Zero;
137
return
Vertex
.One;
141
Vertex
[] children = domain.Select(element => range.Contains(element) ?
Vertex
.One :
Vertex
.Zero).ToArray();
155
internal override IEnumerable<LiteralVertexPair<DomainConstraint<T_Variable, T_Element>>> GetSuccessors(
Vertex
vertex)
164
Dictionary<
Vertex
, Set<T_Element>> vertexToRange = new Dictionary<
Vertex
, Set<T_Element>>();
168
Vertex
successorVertex = vertex.Children[i];
180
var
successorVertex = vertexRange.Key;
System\Data\Common\Utils\Boolean\Converter.cs (3)
26
private readonly
Vertex
_vertex;
37
internal
Vertex
Vertex
133
private void FindAllPaths(
Vertex
vertex, Set<CnfClause<T_Identifier>> cnfClauses, Set<DnfClause<T_Identifier>> dnfClauses,
System\Data\Common\Utils\Boolean\KnowledgeBase.cs (3)
38
private
Vertex
_knowledge;
47
_knowledge =
Vertex
.One; // we know '1', but nothing else at present
71
Vertex
factVertex = converter.Vertex;
System\Data\Common\Utils\Boolean\Solver.cs (55)
16
using IfThenElseKey = Triple<
Vertex
,
Vertex
,
Vertex
>;
34
readonly Dictionary<IfThenElseKey,
Vertex
> _computedIfThenElseValues =
35
new Dictionary<IfThenElseKey,
Vertex
>();
36
readonly Dictionary<
Vertex
,
Vertex
> _knownVertices =
37
new Dictionary<
Vertex
,
Vertex
>(VertexValueComparer.Instance);
40
internal readonly static
Vertex
[] BooleanVariableChildren = new
Vertex
[] {
Vertex
.One,
Vertex
.Zero };
49
internal
Vertex
Not(
Vertex
vertex)
52
return IfThenElse(vertex,
Vertex
.Zero,
Vertex
.One);
55
internal
Vertex
And(IEnumerable<
Vertex
> children)
72
.Aggregate(
Vertex
.One, (left, right) => IfThenElse(left, right,
Vertex
.Zero));
75
internal
Vertex
And(
Vertex
left,
Vertex
right)
78
return IfThenElse(left, right,
Vertex
.Zero);
81
internal
Vertex
Or(IEnumerable<
Vertex
> children)
98
.Aggregate(
Vertex
.Zero, (left, right) => IfThenElse(left,
Vertex
.One, right));
104
internal
Vertex
CreateLeafVertex(int variable,
Vertex
[] children)
123
private
Vertex
GetUniqueVertex(int variable,
Vertex
[] children)
127
Vertex
result = new Vertex(variable, children);
130
Vertex
canonicalResult;
145
private
Vertex
IfThenElse(
Vertex
condition,
Vertex
then,
Vertex
@else)
173
Vertex
result;
190
Vertex
[] resultCases = new
Vertex
[topVariableDomainCount];
226
private static int DetermineTopVariable(
Vertex
condition,
Vertex
then,
Vertex
@else, out int topVariableDomainCount)
251
private static
Vertex
EvaluateFor(
Vertex
vertex, int variable, int variableAssigment)
274
private void AssertVerticesValid(IEnumerable<
Vertex
> vertices)
277
foreach (
Vertex
vertex in vertices)
288
private void AssertVertexValid(
Vertex
vertex)
296
Vertex
comparisonVertex;
308
private class VertexValueComparer : IEqualityComparer<
Vertex
>
314
public bool Equals(
Vertex
x,
Vertex
y)
339
public int GetHashCode(
Vertex
vertex)
System\Data\Common\Utils\Boolean\Vertex.cs (11)
28
sealed class Vertex : IEquatable<
Vertex
>
36
this.Children = new
Vertex
[] { };
39
internal Vertex(int variable,
Vertex
[] children)
51
private static void AssertConstructorArgumentsValid(int variable,
Vertex
[] children)
56
foreach (
Vertex
child in children)
65
internal static readonly
Vertex
One = new Vertex();
70
internal static readonly
Vertex
Zero = new Vertex();
85
internal readonly
Vertex
[] Children;
92
return object.ReferenceEquals(
Vertex
.One, this);
100
return object.ReferenceEquals(
Vertex
.Zero, this);
111
public bool Equals(
Vertex
other)
System\Data\Common\Utils\Boolean\Visitor.cs (10)
243
internal class ToDecisionDiagramConverter<T_Identifier> : Visitor<T_Identifier,
Vertex
>
253
internal static
Vertex
TranslateToRobdd(BoolExpr<T_Identifier> expr, ConversionContext<T_Identifier> context)
261
internal override
Vertex
VisitTrue(TrueExpr<T_Identifier> expression)
263
return
Vertex
.One;
266
internal override
Vertex
VisitFalse(FalseExpr<T_Identifier> expression)
268
return
Vertex
.Zero;
271
internal override
Vertex
VisitTerm(TermExpr<T_Identifier> expression)
276
internal override
Vertex
VisitNot(NotExpr<T_Identifier> expression)
281
internal override
Vertex
VisitAnd(AndExpr<T_Identifier> expression)
286
internal override
Vertex
VisitOr(OrExpr<T_Identifier> expression)
System\Data\Mapping\FunctionImportMapping.cs (18)
284
Vertex
[] mappingConditions = ConvertMappingConditionsToVertices(converter, variables);
330
private
Vertex
[] ConvertMappingConditionsToVertices(
334
Vertex
[] conditions = new
Vertex
[this.NormalizedEntityTypeMappings.Count];
340
Vertex
condition =
Vertex
.One;
353
Vertex
isNullVertex = converter.TranslateTermToVertex(isNull);
372
private Set<EntityType> FindReachableTypes(DomainConstraintConversionContext<string, ValueCondition> converter,
Vertex
[] mappingConditions)
377
Vertex
[] candidateFunctions = new
Vertex
[this.MappedEntityTypes.Count];
381
Vertex
candidateFunction =
Vertex
.One;
405
Vertex
isExactlyThisTypeCondition = converter.Solver.And(
423
private Set<EntityType> FindUnambiguouslyReachableTypes(DomainConstraintConversionContext<string, ValueCondition> converter,
Vertex
[] mappingConditions)
427
Vertex
[] candidateFunctions = new
Vertex
[this.MappedEntityTypes.Count];
431
Vertex
candidateFunction =
Vertex
.One;