Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ BuildTransitionTable()

int[][] System.Xml.Schema.ParticleContentValidator.BuildTransitionTable ( BitSet firstpos,
BitSet[] followpos,
int endMarkerPos )
inlineprivate

Definition at line 349 of file ParticleContentValidator.cs.

350 {
351 int count = _positions.Count;
352 int num = 8192 / count;
353 int count2 = _symbols.Count;
355 Hashtable hashtable = new Hashtable();
356 hashtable.Add(new BitSet(count), -1);
358 int num2 = 0;
359 queue.Enqueue(firstpos);
360 hashtable.Add(firstpos, 0);
361 arrayList.Add(new int[count2 + 1]);
362 while (queue.Count > 0)
363 {
364 BitSet bitSet = queue.Dequeue();
365 int[] array = (int[])arrayList[num2];
366 if (bitSet[endMarkerPos])
367 {
368 array[count2] = 1;
369 }
370 for (int i = 0; i < count2; i++)
371 {
372 BitSet bitSet2 = new BitSet(count);
373 for (int num3 = bitSet.NextSet(-1); num3 != -1; num3 = bitSet.NextSet(num3))
374 {
375 if (i == _positions[num3].symbol)
376 {
378 }
379 }
380 object obj = hashtable[bitSet2];
381 if (obj != null)
382 {
383 array[i] = (int)obj;
384 continue;
385 }
386 int num4 = hashtable.Count - 1;
387 if (num4 >= num)
388 {
389 return null;
390 }
391 queue.Enqueue(bitSet2);
392 hashtable.Add(bitSet2, num4);
393 arrayList.Add(new int[count2 + 1]);
394 array[i] = num4;
395 }
396 num2++;
397 }
398 return (int[][])arrayList.ToArray(typeof(int[]));
399 }
void Add(TKey key, TValue value)
virtual void Add(object key, object? value)
Definition Hashtable.cs:676

References System.Xml.Schema.ParticleContentValidator._positions, System.Xml.Schema.ParticleContentValidator._symbols, System.Collections.Hashtable.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.array, System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Schema.Positions.Count, System.Xml.Schema.SymbolsDictionary.Count, System.Xml.Dictionary, and System.obj.

Referenced by System.Xml.Schema.ParticleContentValidator.Finish().