This class manages a set of elements.
Inheritance: System.Collections.ArrayList
Example #1
0
        /// <seealso cref="Graph.edgeSet()">
        /// </seealso>
        public override SupportClass.SetSupport edgeSet()
        {
            if (m_unmodifiableEdgeSet == null && m_edgeSet != null && m_edgeSet.Count != 0)
            {
                m_unmodifiableEdgeSet = m_edgeSet;                //Collections.unmodifiableSet(m_edgeSet);
            }

            return(m_unmodifiableEdgeSet);
        }
Example #2
0
 public virtual void testToHashSetArray()
 {
     string[] a = { "a", "b" };
     SupportClass.SetSupport <string> s = ContainerUtil.toHashSet(a);
     Assert.IsTrue(s.Contains("a"));
     Assert.IsTrue(s.Contains("b"));
     Assert.IsFalse(s.Contains("c"));
     Assert.AreEqual(s.Count, a.Length);
 }
Example #3
0
        /// <seealso cref="Graph.vertexSet()">
        /// </seealso>
        public override SupportClass.SetSupport vertexSet()
        {
            if (m_unmodifiableVertexSet == null && m_vertexMap.Keys != null && m_vertexMap.Keys.Count != 0)
            {
                m_unmodifiableVertexSet = new SupportClass.HashSetSupport(m_vertexMap.Keys);                //Collections.unmodifiableSet(new SupportClass.HashSetSupport(m_vertexMap.Keys));
            }

            return(m_unmodifiableVertexSet);
        }
Example #4
0
        /// <seealso cref="org._3pq.jgrapht.Graph.vertexSet()">
        /// </seealso>
        public override SupportClass.SetSupport vertexSet()
        {
            if (m_unmodifiableVertexSet == null)
            {
                //UPGRADE_ISSUE: Method 'java.util.Collections.unmodifiableSet' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javautilCollections'"
                m_unmodifiableVertexSet = m_vertexSet;// Collections.unmodifiableSet(m_vertexSet);
            }

            return(m_unmodifiableVertexSet);
        }
        /// <summary> Tests if there is a path from the specified source vertex to the
        /// specified target vertices. For a directed graph, direction is ignored
        /// for this interpretation of path.
        ///
        /// <p>
        /// Note: Future versions of this method might not ignore edge directions
        /// for directed graphs.
        /// </p>
        ///
        /// </summary>
        /// <param name="sourceVertex">one end of the path.
        /// </param>
        /// <param name="targetVertex">another end of the path.
        ///
        /// </param>
        /// <returns> <code>true</code> if and only if there is a path from the source
        /// vertex to the target vertex.
        /// </returns>
        public virtual bool pathExists(System.Object sourceVertex, System.Object targetVertex)
        {
            /*
             * TODO: Ignoring edge direction for directed graph may be
             * confusing. For directed graphs, consider Dijkstra's algorithm.
             */
            SupportClass.SetSupport sourceSet = connectedSetOf(sourceVertex);

            return(sourceSet.Contains(targetVertex));
        }
Example #6
0
        public virtual void testGetSet()
        {
            VString v = new VString();

            v.Add("a");
            v.Add("c");
            v.Add("b");
            SupportClass.SetSupport <string> s = v.getSet();
            Assert.AreEqual(v.Count, s.Count);
            Assert.IsTrue(s.Contains("c"));
        }
Example #7
0
        private void  execute(SupportClass.SetSupport s, System.Object v)
        {
            ProbeIterator iter = new ProbeIterator(this, s, v);

            //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
            while (iter.MoveNext())
            {
                //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'"
                System.Object generatedAux = iter.Current;
            }
        }
Example #8
0
 ///
 ///	 <summary> * remove the keys specified in set and then erase any duplicates and emptys
 ///	 *  </summary>
 ///	 * <param name="set"> </param>
 ///
 public virtual void removeKeys(SupportClass.SetSupport <string> @set)
 {
     for (int i = Count - 1; i >= 0; i--)
     {
         this[i].removeKeys(@set);
         if (this[i].IsEmpty())
         {
             RemoveAt(i);
         }
     }
     unify();
 }
Example #9
0
        /// <summary> Creates a new Subgraph.
        ///
        /// </summary>
        /// <param name="base">the base (backing) graph on which the subgraph will be
        /// based.
        /// </param>
        /// <param name="vertexSubset">vertices to include in the subgraph. If
        /// <code>null</code> then all vertices are included.
        /// </param>
        /// <param name="edgeSubset">edges to in include in the subgraph. If
        /// <code>null</code> then all the edges whose vertices found in the
        /// graph are included.
        /// </param>
        public Subgraph(Graph base_Renamed, SupportClass.SetSupport vertexSubset, SupportClass.SetSupport edgeSubset)
        {
            m_base = base_Renamed;

            if (m_base is ListenableGraph)
            {
                ((ListenableGraph)m_base).addGraphListener(new BaseGraphListener(this));
            }

            addVerticesUsingFilter(base_Renamed.vertexSet(), vertexSubset);
            addEdgesUsingFilter(base_Renamed.edgeSet(), edgeSubset);
        }
Example #10
0
        static Identifier()
        {
            idMap_ = new System.Collections.Hashtable();
            {
                // Valid JMS header fields
                System.String[] jmsHeaders_ = new System.String[]{"JMSDeliveryMode", "JMSPriority", "JMSMessageID", "JMSTimestamp", "JMSCorrelationID", "JMSType", "JMSRedelivered", "JMSExpiration"};
                //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"'
                jmsHeadersSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(jmsHeaders_));

                // Valid JMS header fields
                System.String[] reservedNames_ = new System.String[]{"NULL", "TRUE", "FALSE", "NULL", "NOT", "AND", "OR", "BETWEEN", "LIKE", "IN", "IS", "ESCAPE"};
                //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"'
                reservedNamesSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(reservedNames_));
            }
        }
Example #11
0
        static Identifier()
        {
            idMap_ = new System.Collections.Hashtable();
            {
                // Valid JMS header fields
                System.String[] jmsHeaders_ = new System.String[] { "JMSDeliveryMode", "JMSPriority", "JMSMessageID", "JMSTimestamp", "JMSCorrelationID", "JMSType", "JMSRedelivered", "JMSExpiration" };
                //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"'
                jmsHeadersSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(jmsHeaders_));

                // Valid JMS header fields
                System.String[] reservedNames_ = new System.String[] { "NULL", "TRUE", "FALSE", "NULL", "NOT", "AND", "OR", "BETWEEN", "LIKE", "IN", "IS", "ESCAPE" };
                //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Arrays.asList' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"'
                reservedNamesSet_ = new SupportClass.HashSetSupport(SupportClass.CollectionSupport.ToCollectionSupport(reservedNames_));
            }
        }
Example #12
0
        /*
         * The subroutine of DFS. NOTE: the set is used to distinguish between 1st
         * and 2nd round of DFS. set == null: finished vertices are stored (1st
         * round). set != null: all vertices found will be saved in the set (2nd
         * round)
         */
        private void  dfsVisit(DirectedGraph graph, VertexData vertexData, SupportClass.SetSupport vertices)
        {
            System.Collections.ArrayList stack = new System.Collections.ArrayList();
            stack.Add(vertexData);

            while (!(stack.Count == 0))
            {
                VertexData data = (VertexData)SupportClass.StackSupport.Pop(stack);

                if (!data.m_discovered)
                {
                    data.m_discovered = true;

                    if (vertices != null)
                    {
                        vertices.Add(data.m_vertex);
                    }

                    // TODO: other way to identify when this vertex is finished!?
                    stack.Add(new VertexData(this, data, true, true));

                    // follow all edges
                    System.Collections.IEnumerator iter = graph.outgoingEdgesOf(data.m_vertex).GetEnumerator();

                    //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
                    while (iter.MoveNext())
                    {
                        //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'"
                        DirectedEdge edge       = (DirectedEdge)iter.Current;
                        VertexData   targetData = (VertexData)m_vertexToVertexData[edge.Target];

                        if (!targetData.m_discovered)
                        {
                            // the "recursion"
                            stack.Add(targetData);
                        }
                    }
                }
                else if (data.m_finished)
                {
                    if (vertices == null)
                    {
                        // see TODO above
                        m_orderedVertices.Insert(0, data.m_vertex);
                    }
                }
            }
        }
Example #13
0
File: UnitSet.cs Project: ikvm/test
        public string toString(string delim)
        {
            StringBuilder builder    = new StringBuilder(300);
            IEnumerator   enumerator = new SupportClass.SetSupport(this.hashtable_0.Keys).GetEnumerator();

            while (enumerator.MoveNext())
            {
                string key = ((string)enumerator.Current).Trim();
                builder.Append(delim).Append(key).Append("=").Append(this[key]);
            }
            if (builder.Length <= 0)
            {
                return(null);
            }
            return(builder.ToString(delim.Length, builder.Length - delim.Length));
        }
Example #14
0
        private void  addVerticesUsingFilter(SupportClass.SetSupport vertexSet, SupportClass.SetSupport filter)
        {
            System.Object v;

            //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
            for (System.Collections.IEnumerator i = vertexSet.GetEnumerator(); i.MoveNext();)
            {
                v = ((DictionaryEntry)i.Current).Value;

                // note the use of short circuit evaluation
                if (filter == null || filter.Contains(v))
                {
                    addVertex(v);
                }
            }
        }
Example #15
0
 ///
 ///		 <summary> *  </summary>
 ///
 protected internal ExtensionFileFilter(string fileExtension)
 {
     if (fileExtension != null)
     {
         VString list = new VString(StringUtil.tokenize(fileExtension, ",", false));
         m_extension = new SupportClass.HashSetSupport <string>();
         for (int i = 0; i < list.Count; i++)
         {
             string st = list.stringAt(i);
             if (st.StartsWith("."))
             {
                 st = st.Substring(1);
             }
             st = st.ToLower();
             m_extension.Add(st);
         }
     }
 }
Example #16
0
 private void method_9(Env env_0)
 {
     try
     {
         IDbConnection connection = env_0.getConnection();
         if (connection != null)
         {
             try
             {
                 connection.Close();
             }
             catch (Exception)
             {
             }
         }
         StringMap connections = env_0.Connections;
         if ((connections != null) && (connections.Count > 0))
         {
             IEnumerator enumerator = new SupportClass.SetSupport(connections.Keys).GetEnumerator();
             while (enumerator.MoveNext())
             {
                 string        current     = (string)enumerator.Current;
                 IDbConnection connection2 = (IDbConnection)connections[current];
                 try
                 {
                     connection2.Close();
                     continue;
                 }
                 catch (Exception)
                 {
                     continue;
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
Example #17
0
        private void  addEdgesUsingFilter(SupportClass.SetSupport edgeSet, SupportClass.SetSupport filter)
        {
            Edge e;
            bool containsVertices;
            bool edgeIncluded;

            //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
            for (System.Collections.IEnumerator i = edgeSet.GetEnumerator(); i.MoveNext();)
            {
                e = (Edge)((DictionaryEntry)i.Current).Value;

                containsVertices = containsVertex(e.Source) && containsVertex(e.Target);

                // note the use of short circuit evaluation
                edgeIncluded = (filter == null) || filter.Contains(e);

                if (containsVertices && edgeIncluded)
                {
                    addEdge(e);
                }
            }
        }
Example #18
0
        public virtual JDFPRItem setPR(JDFAction action, int pageSet, JDFAttributeMap prMap, VString groupBy)
        {
            JDFAttributeMap groupMap    = null;
            JDFAttributeMap instanceMap = null;

            if (prMap != null)
            {
                groupMap = new JDFAttributeMap(prMap);
                SupportClass.SetSupport <string> @set = groupBy.getSet();
                groupMap.reduceMap(@set);
                instanceMap = new JDFAttributeMap(prMap);
                instanceMap.removeKeys(@set);
            }
            JDFPRItem pi = getCreatePRItem(action, groupMap);

            JDFPRGroup      pg         = pi.getCreatePRGroup(groupMap);
            JDFPROccurrence pgInstance = pg.getCreatePROccurrence(instanceMap);

            pgInstance.addOccurrences(1, action.getSeverity());
            pi.insertPageSet(pageSet);
            return(pi);
        }
        private System.Collections.IList lazyFindConnectedSets()
        {
            if (m_connectedSets == null)
            {
                //m_connectedSets = new System.Collections.ArrayList();

                SupportClass.SetSupport vertexSet = m_graph.vertexSet();

                if (vertexSet.Count > 0)
                {
                    BreadthFirstIterator i = new BreadthFirstIterator(m_graph, null);
                    i.addTraversalListener(new MyTraversalListener(this));

                    while (i.MoveNext())
                    {
                        System.Object generatedAux = i.Current;
                    }
                }
            }

            return(m_connectedSets);
        }
        /// <summary> Returns a set of all vertices that are in the maximally connected
        /// component together with the specified vertex. For more on maximally
        /// connected component, see <a
        /// href="http://www.nist.gov/dads/HTML/maximallyConnectedComponent.html">
        /// http://www.nist.gov/dads/HTML/maximallyConnectedComponent.html</a>.
        ///
        /// </summary>
        /// <param name="vertex">the vertex for which the connected set to be returned.
        ///
        /// </param>
        /// <returns> a set of all vertices that are in the maximally connected
        /// component together with the specified vertex.
        /// </returns>
        public virtual SupportClass.SetSupport connectedSetOf(System.Object vertex)
        {
            SupportClass.SetSupport connectedSet = (SupportClass.SetSupport)m_vertexToConnectedSet[vertex];

            if (connectedSet == null)
            {
                //UPGRADE_TODO: Class 'java.util.HashSet' was converted to 'SupportClass.HashSetSupport' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashSet'"
                connectedSet = new SupportClass.HashSetSupport();

                BreadthFirstIterator i = new BreadthFirstIterator(m_graph, vertex);

                //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
                while (i.MoveNext())
                {
                    //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'"
                    connectedSet.Add(i.Current);
                }

                m_vertexToConnectedSet[vertex] = connectedSet;
            }

            return(connectedSet);
        }
Example #21
0
        ///
        ///	 <summary> * get the list of Device/@DeviceIDs strings as a set
        ///	 *  </summary>
        ///	 * <returns> the set of DeviceIDs, null if no Device is specified </returns>
        ///
        public virtual SupportClass.SetSupport <string> getDeviceIDSet()
        {
            int size = 0;

            SupportClass.SetSupport <string> @set = null;

            VElement v = getChildElementVector(ElementName.DEVICE, null);

            if (v != null)
            {
                size = v.Count;
                @set = size == 0 ? null : new SupportClass.HashSetSupport <string>();
                for (int i = 0; i < size; i++)
                {
                    string qeid = ((JDFDevice)v[i]).getDeviceID();
                    if (!isWildCard(qeid))
                    {
                        @set.Add(qeid);
                    }
                }
            }

            return(@set != null && @set.Count > 0 ? @set : null);
        }
Example #22
0
        /// <summary> Construct a new pseudograph. The pseudograph can either be directed or
        /// undirected, depending on the specified edge factory. A sample edge is
        /// created using the edge factory to see if the factory is compatible with
        /// this class of  graph. For example, if this graph is a
        /// <code>DirectedGraph</code> the edge factory must produce
        /// <code>DirectedEdge</code>s. If this is not the case, an
        /// <code>IllegalArgumentException</code> is thrown.
        ///
        /// </summary>
        /// <param name="ef">the edge factory of the new graph.
        /// </param>
        /// <param name="allowMultipleEdges">whether to allow multiple edges or not.
        /// </param>
        /// <param name="allowLoops">whether to allow edges that are self-loops or not.
        ///
        /// </param>
        /// <throws>  NullPointerException if the specified edge factory is </throws>
        /// <summary>         <code>null</code>.
        /// </summary>
        public AbstractBaseGraph(EdgeFactory ef, bool allowMultipleEdges, bool allowLoops)
        {
            if (ef == null)
            {
                throw new System.NullReferenceException();
            }

            m_vertexMap             = new SupportClass.HashSetSupport();
            m_edgeSet               = new SupportClass.HashSetSupport();
            m_edgeFactory           = ef;
            m_allowingLoops         = allowLoops;
            m_allowingMultipleEdges = allowMultipleEdges;

            m_specifics = createSpecifics();

            Edge e = ef.createEdge(new System.Object(), new System.Object());

            m_factoryEdgeClass = e.GetType();

            m_edgeListFactory = new ArrayListFactory();

            m_unmodifiableEdgeSet   = null;
            m_unmodifiableVertexSet = null;
        }
Example #23
0
        ///
        ///	 <summary> * return true if the queuentry matches this filter
        ///	 *
        ///	 * @return </summary>
        ///
        public virtual bool matches(JDFQueueEntry qe)
        {
            if (qe == null)
            {
                return(false);
            }

            if (EnumQueueEntryDetails.None.Equals(getQueueEntryDetails()))
            {
                return(false);
            }

            SupportClass.SetSupport <string> qeDefs = getQueueEntryDefSet();
            if (qeDefs != null && !qeDefs.Contains(qe.getQueueEntryID()))
            {
                return(false);
            }

            qeDefs = getDeviceIDSet();
            if (qeDefs != null && !qeDefs.Contains(qe.getDeviceID()))
            {
                return(false);
            }

            if (hasAttribute(AttributeName.GANGNAMES) && !getGangNames().Contains(qe.getGangName()))
            {
                return(false);
            }

            if (hasAttribute(AttributeName.STATUSLIST) && !getStatusList().Contains(qe.getQueueEntryStatus()))
            {
                return(false);
            }

            return(true);
        }
Example #24
0
            ///

            ///
            ///		 <summary> * gets the sum of all matching tags, with the assumpzion that no condition defaults to good
            ///		 *  </summary>
            ///		 * <param name="poolParent">  </param>
            ///		 * <param name="attName">  </param>
            ///		 * <param name="vPart">  </param>
            ///		 * <returns> the sum
            ///		 *  </returns>
            ///
            public static double getAmountPoolSumDouble(IAmountPoolContainer poolParent, string attName, VJDFAttributeMap vPart)
            {
                VJDFAttributeMap vPartLocal = vPart;

                if (vPartLocal == null)
                {
                    vPartLocal = poolParent.getPartMapVector();
                }

                if (poolParent.hasAttribute(attName))
                {
                    return(poolParent.getRealAttribute(attName, null, 0));
                }

                VJDFAttributeMap vm       = vPartLocal == null ? null : new VJDFAttributeMap(vPartLocal);
                JDFResource      linkRoot = poolParent.getLinkRoot();

                if (linkRoot != null && vm != null)
                {
                    SupportClass.SetSupport <string> @set = linkRoot.getPartIDKeys().getSet();
                    @set.Add(AttributeName.CONDITION); // retain good / waste
                    vm.reduceMap(@set);
                }

                if (vm == null)
                {
                    vm = new VJDFAttributeMap();
                    vm.Add((JDFAttributeMap)null);
                }

                double        dd = 0;
                JDFAmountPool ap = poolParent.getAmountPool();

                if (ap == null)
                {
                    return(poolParent.getRealAttribute(attName, null, 0.0));
                }

                VElement vParts = ap.getChildElementVector(ElementName.PARTAMOUNT, null);

                if (vParts.IsEmpty())
                {
                    return(poolParent.getRealAttribute(attName, null, 0.0));
                }

                bool isWaste = vPartLocal != null && vPartLocal.subMap(new JDFAttributeMap(AttributeName.CONDITION, "Waste"));

                if (!isWaste && (vPartLocal == null || !vPartLocal.subMap(new JDFAttributeMap(AttributeName.CONDITION, "*"))))
                {
                    vPartLocal = new VJDFAttributeMap(vPartLocal);
                    vPartLocal.Add(new JDFAttributeMap(AttributeName.CONDITION, "Good"));
                }

                for (int j = 0; j < vParts.Count; j++)
                {
                    JDFPartAmount    pa            = (JDFPartAmount)vParts[j];
                    VJDFAttributeMap partMapVector = pa.getPartMapVector();
                    if (isWaste)
                    {
                        bool hasCondition = partMapVector.subMap(new JDFAttributeMap(AttributeName.CONDITION, "*"));
                        if (!hasCondition)
                        {
                            continue;
                        }
                    }

                    if (!partMapVector.overlapsMap(vm))
                    {
                        continue;
                    }

                    string ret = null;
                    ret = pa.getAttribute(attName, null, null);
                    if (ret == null)
                    {
                        ret = poolParent.getAttribute(attName, null, null);
                    }

                    dd += StringUtil.parseDouble(ret, 0.0);
                }

                return(dd);
            }
 /// <seealso cref="TraversalListenerAdapter.connectedComponentStarted(ConnectedComponentTraversalEvent)">
 /// </seealso>
 public override void connectedComponentStarted(ConnectedComponentTraversalEvent e)
 {
     m_currentConnectedSet             = new SupportClass.HashSetSupport();
     enclosingInstance.m_connectedSets = m_currentConnectedSet;
 }
			/// <seealso cref="TraversalListenerAdapter.connectedComponentStarted(ConnectedComponentTraversalEvent)">
			/// </seealso>
			public override void connectedComponentStarted(ConnectedComponentTraversalEvent e)
			{
                m_currentConnectedSet = new SupportClass.HashSetSupport();
                enclosingInstance.m_connectedSets = m_currentConnectedSet;
			}
Example #27
0
        private void preapareArgs(ReportDefine reportDefine_0, Hashtable hashtable_0, Env env_0)
        {
            Args arguments = reportDefine_0.Arguments;

            if (arguments.size() > 0)
            {
                int num2 = arguments.size();
                for (int i = 0; i < num2; i++)
                {
                    Arg    arg = arguments[i];
                    string val = null;
                    if (hashtable_0 != null)
                    {
                        val = (string)hashtable_0[arg.enName];
                    }
                    if (((val == null) && (arg.value_Renamed != null)) && (arg.value_Renamed.Trim().Length > 0))
                    {
                        val = arg.value_Renamed;
                    }
                    int    num3       = int.Parse(arg.type);
                    object paramValue = null;
                    try
                    {
                        paramValue = ArgDataType.getProperData(num3, val);
                    }
                    catch (Exception)
                    {
                        throw new Exception(new StringBuilder("参数\"").Append(arg.chName).Append("\"的值").Append(val).Append("与其类型不匹配!").ToString().ToString());
                    }
                    env_0.putParam(arg.enName, paramValue);
                    _builder.Append("<arg><name>" + arg.enName + "</name><value>" + Convert.ToString(paramValue) + "</value></arg>");
                }
            }
            StringMap macros = reportDefine_0.Macros;

            if ((macros != null) && (macros.Count > 0))
            {
                IEnumerator enumerator = new SupportClass.SetSupport(macros.Keys).GetEnumerator();
                while (enumerator.MoveNext())
                {
                    string current = (string)enumerator.Current;
                    string str4    = null;
                    if (hashtable_0 != null)
                    {
                        str4 = (string)hashtable_0[current];
                    }
                    if (str4 == null)
                    {
                        str4 = (string)macros[current];
                    }
                    _builder.Append("<macro><name>" + current + "</name><value>" + str4 + "</value></macro>");
                    env_0.putMacro(current, str4);
                }
            }
            string str      = null;
            string rootPath = null;

            if (env_0.Request == null)
            {
                str      = env_0.getParameter("e_setparammacro");
                rootPath = FileAction.rootPath;
            }
            else
            {
                str      = env_0.Request["e_setparammacro"];
                rootPath = env_0.Request.PhysicalApplicationPath;
            }
            if ((str != null) && (str.Length > 0))
            {
                Type type = Assembly.LoadFrom(rootPath + @"bin\LoadEbiao.dll").GetType("LoadEbiao.IParamMacro");
                if (type != null)
                {
                    object[]     args       = new object[0];
                    object       obj2       = Activator.CreateInstance(type, args);
                    BindingFlags invokeAttr = BindingFlags.Public | BindingFlags.Instance;
                    object[]     parameters = new object[] { env_0 };
                    try
                    {
                        type.GetMethod("setParams").Invoke(obj2, invokeAttr, Type.DefaultBinder, parameters, null);
                    }
                    catch (Exception exception)
                    {
                        throw new Exception(exception.InnerException.Message);
                    }
                    try
                    {
                        type.GetMethod("setMacros").Invoke(obj2, invokeAttr, Type.DefaultBinder, parameters, null);
                    }
                    catch (Exception exception2)
                    {
                        throw new Exception(exception2.InnerException.Message);
                    }
                }
            }
        }
		/// <summary> Construct a new pseudograph. The pseudograph can either be directed or
		/// undirected, depending on the specified edge factory. A sample edge is
		/// created using the edge factory to see if the factory is compatible with
		/// this class of  graph. For example, if this graph is a
		/// <code>DirectedGraph</code> the edge factory must produce
		/// <code>DirectedEdge</code>s. If this is not the case, an
		/// <code>IllegalArgumentException</code> is thrown.
		/// 
		/// </summary>
		/// <param name="ef">the edge factory of the new graph.
		/// </param>
		/// <param name="allowMultipleEdges">whether to allow multiple edges or not.
		/// </param>
		/// <param name="allowLoops">whether to allow edges that are self-loops or not.
		/// 
		/// </param>
		/// <throws>  NullPointerException if the specified edge factory is </throws>
		/// <summary>         <code>null</code>.
		/// </summary>
		public AbstractBaseGraph(EdgeFactory ef, bool allowMultipleEdges, bool allowLoops)
		{
			if (ef == null)
			{
				throw new System.NullReferenceException();
			}

            m_vertexMap = new SupportClass.HashSetSupport();
            m_edgeSet = new SupportClass.HashSetSupport();
			m_edgeFactory = ef;
			m_allowingLoops = allowLoops;
			m_allowingMultipleEdges = allowMultipleEdges;
			
			m_specifics = createSpecifics();
			
			Edge e = ef.createEdge(new System.Object(), new System.Object());
			m_factoryEdgeClass = e.GetType();
			
			m_edgeListFactory = new ArrayListFactory();

            m_unmodifiableEdgeSet = null;
            m_unmodifiableVertexSet = null;
		}
		/// <seealso cref="Graph.edgeSet()">
		/// </seealso>
		public override SupportClass.SetSupport edgeSet()
		{
            if (m_unmodifiableEdgeSet == null && m_edgeSet != null && m_edgeSet.Count != 0)
			{
				m_unmodifiableEdgeSet = m_edgeSet;//Collections.unmodifiableSet(m_edgeSet);
			}
			
			return m_unmodifiableEdgeSet;
		}
		/// <seealso cref="Graph.vertexSet()">
		/// </seealso>
		public override SupportClass.SetSupport vertexSet()
		{
            if (m_unmodifiableVertexSet == null && m_vertexMap.Keys != null && m_vertexMap.Keys.Count != 0)
			{
				m_unmodifiableVertexSet = new SupportClass.HashSetSupport(m_vertexMap.Keys);//Collections.unmodifiableSet(new SupportClass.HashSetSupport(m_vertexMap.Keys));
			}
			
			return m_unmodifiableVertexSet;
		}
Example #31
0
 /// <summary> Creates a new induced Subgraph. The subgraph will keep track of edges
 /// being added to its vertex subset as well as deletion of edges and
 /// vertices. If base it not listenable, this is identical to the call
 /// Subgraph(base, vertexSubset, null) .
 ///
 /// </summary>
 /// <param name="base">the base (backing) graph on which the subgraph will be
 /// based.
 /// </param>
 /// <param name="vertexSubset">vertices to include in the subgraph. If
 /// <code>null</code> then all vertices are included.
 /// </param>
 public Subgraph(Graph base_Renamed, SupportClass.SetSupport vertexSubset) : this(base_Renamed, vertexSubset, null)
 {
     m_isInduced = true;
 }
Example #32
0
 internal ProbeIterator(CycleDetector enclosingInstance, SupportClass.SetSupport cycleSet, System.Object startVertex) : base(Enclosing_Instance.m_graph, startVertex)
 {
     InitBlock(enclosingInstance);
     m_cycleSet = cycleSet;
     m_path     = new System.Collections.ArrayList();
 }
Example #33
0
		/// <seealso cref="org._3pq.jgrapht.Graph.vertexSet()">
		/// </seealso>
		public override SupportClass.SetSupport vertexSet()
		{
			if (m_unmodifiableVertexSet == null)
			{
				//UPGRADE_ISSUE: Method 'java.util.Collections.unmodifiableSet' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javautilCollections'"
                m_unmodifiableVertexSet = m_vertexSet;// Collections.unmodifiableSet(m_vertexSet);
			}
			
			return m_unmodifiableVertexSet;
		}
Example #34
0
 public UndirectedSubgraph(UndirectedGraph base_Renamed, SupportClass.SetSupport vertexSubset)
     : base(base_Renamed, vertexSubset)
 {
 }
Example #35
0
 /// <summary> Ctor.</summary>
 /// <param name="lhs">Data to check for.
 /// </param>
 /// <param name="rhs">Membership set.
 /// </param>
 public OpIN(IExpression lhs, SupportClass.SetSupport rhs)
 {
     lhs_ = lhs;
     rhs_ = rhs;
 }
Example #36
0
 /// <summary> Creates a new directed subgraph.
 ///
 /// </summary>
 /// <param name="base">the base (backing) graph on which the subgraph will be
 /// based.
 /// </param>
 /// <param name="vertexSubset">vertices to include in the subgraph. If
 /// <code>null</code> then all vertices are included.
 /// </param>
 /// <param name="edgeSubset">edges to in include in the subgraph. If
 /// <code>null</code> then all the edges whose vertices found in the
 /// graph are included.
 /// </param>
 public DirectedSubgraph(DirectedGraph base_Renamed, SupportClass.SetSupport vertexSubset, SupportClass.SetSupport edgeSubset) : base(base_Renamed, vertexSubset, edgeSubset)
 {
 }
Example #37
0
 /// <summary> Ctor.</summary>
 /// <param name="lhs">Data to check for.
 /// </param>
 /// <param name="rhs">Membership set.
 /// </param>
 public OpIN(IExpression lhs, SupportClass.SetSupport rhs)
 {
     lhs_ = lhs;
     rhs_ = rhs;
 }