예제 #1
0
        private static void DumpEdge(StreamWriter sw, SearchOperationType opType, SearchPlanNode source, SearchPlanNode target, float cost, bool markRed)
        {
            String typeStr = " #";

            switch (opType)
            {
            case SearchOperationType.Outgoing: typeStr = "--"; break;

            case SearchOperationType.Incoming: typeStr = "->"; break;

            case SearchOperationType.Incident: typeStr = "<->"; break;

            case SearchOperationType.ImplicitSource: typeStr = "IS"; break;

            case SearchOperationType.ImplicitTarget: typeStr = "IT"; break;

            case SearchOperationType.Implicit: typeStr = "IM"; break;

            case SearchOperationType.Lookup: typeStr = " *"; break;

            case SearchOperationType.ActionPreset: typeStr = " p"; break;

            case SearchOperationType.NegIdptPreset: typeStr = "np"; break;

            case SearchOperationType.SubPreset: typeStr = "sp"; break;
            }

            sw.WriteLine("edge:{{sourcename:\"{0}\" targetname:\"{1}\" label:\"{2} / {3:0.00}\"{4}}}",
                         GetDumpName(source), GetDumpName(target), typeStr, cost, markRed ? " color:red" : "");
        }
예제 #2
0
        public float LocalCost; // only used in benchmarking

        public SearchPlanEdge(SearchOperationType type, SearchPlanNode source, SearchPlanNode target, float cost)
        {
            Target = target;
            Cost   = cost;
            Source = source;
            Type   = type;
        }
예제 #3
0
 public SearchOperation(SearchOperationType type, object elem,
                        SearchPlanNode srcSPNode, float costToEnd)
 {
     Type         = type;
     Element      = elem;
     SourceSPNode = srcSPNode;
     CostToEnd    = costToEnd;
 }
예제 #4
0
 public PlanEdge(SearchOperationType type, PlanNode source, PlanNode target, float cost)
 {
     Source  = source;
     Target  = target;
     Cost    = cost;
     mstCost = (float)Math.Max(Math.Log(cost), 1);
     //            mstCost = (float) Math.Max(Math.Log(cost), 0.0001);
     //            mstCost = cost;
     Type = type;
 }
예제 #5
0
        public object Clone(SearchOperationType searchOperationType)
        {
            // clone the condition as we may need to set the parallelized flag for it, while the original must stay untouched
            object          ElementWithConditionCloned = Element is PatternCondition ? (Element as PatternCondition).Clone() : Element;
            SearchOperation so = new SearchOperation(searchOperationType, ElementWithConditionCloned, SourceSPNode, CostToEnd);

            so.Isomorphy          = (IsomorphyInformation)Isomorphy.Clone();
            so.ConnectednessCheck = (ConnectednessCheck)ConnectednessCheck.Clone();
            so.Storage            = Storage;
            so.StorageIndex       = StorageIndex;
            so.IndexAccess        = IndexAccess;
            so.NameLookup         = NameLookup;
            so.UniqueLookup       = UniqueLookup;
            so.Expression         = Expression;
            return(so);
        }
예제 #6
0
        private void DumpEdge(StreamWriter sw, SearchOperationType opType, SearchPlanNode source, SearchPlanNode target, float cost, bool markRed)
        {
            String typeStr = " #";
            switch(opType)
            {
                case SearchOperationType.Outgoing: typeStr = "--"; break;
                case SearchOperationType.Incoming: typeStr = "->"; break;
                case SearchOperationType.Incident: typeStr = "<->"; break;
                case SearchOperationType.ImplicitSource: typeStr = "IS"; break;
                case SearchOperationType.ImplicitTarget: typeStr = "IT"; break;
                case SearchOperationType.Implicit: typeStr = "IM"; break;
                case SearchOperationType.Lookup: typeStr = " *"; break;
                case SearchOperationType.ActionPreset: typeStr = " p"; break;
                case SearchOperationType.NegIdptPreset: typeStr = "np"; break;
                case SearchOperationType.SubPreset: typeStr = "sp"; break;
            }

            sw.WriteLine("edge:{{sourcename:\"{0}\" targetname:\"{1}\" label:\"{2} / {3:0.00}\"{4}}}",
                GetDumpName(source), GetDumpName(target), typeStr, cost, markRed ? " color:red" : "");
        }
예제 #7
0
 public PlanEdge(SearchOperationType type, PlanNode source, PlanNode target, float cost)
 {
     Source = source;
     Target = target;
     Cost = cost;
     mstCost = (float)Math.Max(Math.Log(cost), 1);
     //            mstCost = (float) Math.Max(Math.Log(cost), 0.0001);
     //            mstCost = cost;
     Type = type;
 }