C# Class BooRunner.Tools.FastParser

Fast parsing algorithm using divide-by-two (O[n*{log n}^2]).
Inheritance: ParserBase
Show file Open project: juanplopes/euler

Public Methods

Method Description
FastParser ( IParser pow2Parser, IParser classicParser ) : System

Creates new FastParser instance.

Parse ( string value, int startIndex, int endIndex, uint numberBase, uint>.IDictionary charToDigits, uint digitsRes ) : uint

Parses provided string representation of BigInteger object.

Method Details

FastParser() public method

Creates new FastParser instance.
public FastParser ( IParser pow2Parser, IParser classicParser ) : System
pow2Parser IParser Parser for pow2 case.
classicParser IParser Classic parser.
return System

Parse() public method

Parses provided string representation of BigInteger object.
public Parse ( string value, int startIndex, int endIndex, uint numberBase, uint>.IDictionary charToDigits, uint digitsRes ) : uint
value string Number as string.
startIndex int Index inside string from which to start.
endIndex int Index inside string on which to end.
numberBase uint Number base.
charToDigits uint>.IDictionary Char->digit dictionary.
digitsRes uint Resulting digits.
return uint