+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given
+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given
+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given
+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given
+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given
+ S = 1 + Ppm/1000000
+ [ Xt ] [ S -Ez*S +Ey*S Dx ] [ Xs ]
+ [ Yt ] = [ +Ez*S S -Ex*S Dy ] [ Ys ]
+ [ Zt ] [ -Ey*S +Ex*S S Dz ] [ Zs ]
+ [ 1 ] [ 0 0 0 1 ] [ 1 ]
+ TOWGS84[dx, dy, dz, ex, ey, ez, ppm]TOWGS84[dx, dy, dz, ex, ey, ez, ppm]NaN
+ (which is also the value of Envelope so that it contains
+ the given Envelope so that it contains
+ the given Envelope so that it contains
+ the given this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simple+ |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ LineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simple+ |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ LineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simple+ |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ LineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simple+ |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ LineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simple+ |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ LineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+
+ for all geometries a, b: DHD(a, b) <= HD(a, b)
+
+ The approximation can be made as close as needed by densifying the input geometries.
+ In the limit, this value will approach the true Hausdorff distance:
+
+ DHD(A, B, densifyFactor) -> HD(A, B) as densifyFactor -> 0.0
+
+ The default approximation is exact or close enough for a large subset of useful cases.
+
+ A = LINESTRING (0 0, 100 0, 10 100, 10 100)
+ B = LINESTRING (0 100, 0 10, 80 10)
+
+ DHD(A, B) = 22.360679774997898
+ HD(A, B) ~= 47.8
+
+ doubles, allowing for NaN values.
+ NaN is treated as being less than any valid number.
+ double
+ A double
+ this, if the geometry is not a collection.
+ false.
+ within predicate has the following equivalent definitions:
+ equals predicate has the following equivalent definitions:
+ + T*F + **F + FF* +
Geometrys are topologically equalo, as
+ defined in "Normal Form For Geometry" in the JTS Technical
+ Specifications
+ false if it is not met.
+ (This is a looser test than checking for validity).Geometrys are always simple.Geometry is simpleLineString
+ 0.0 returns the start point of the segment;
+ A fraction of 1.0 returns the end point of the segment.
+ If the fraction is < 0.0 or > 1.0 the point returned
+ will lie before the start or beyond the end of the segment.
+ 0.0 offsets from the start point of the segment;
+ A fraction of 1.0 offsets from the end point of the segment.
+ The computed point is offset to the left of the line if the offset distance is
+ positive, to the right if negative.
+ true if this object has valid values
+
+ + A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') + by representing it as a 3x1 matrix and using matrix multiplication to compute: ++ T = | m00 m01 m02 | + | m10 m11 m12 | + | 0 0 1 | +
++ | x' | = T x | x | + | y' | | y | + | 1 | | 1 | +
++ A.compose(B) = TB x TA +
++ | 1 0 0 | + | 0 1 0 | + | 0 0 1 | +
++ * 1 + * inverse(A) = --- x adjoint(A) + * det + * + * + * = 1 | m11 -m01 m01*m12-m02*m11 | + * --- x | -m10 m00 -m00*m12+m10*m02 | + * det | 0 0 m00*m11-m10*m01 | + * + * + * + * = | m11/det -m01/det m01*m12-m02*m11/det | + * | -m10/det m00/det -m00*m12+m10*m02/det | + * | 0 0 1 | + * + *
++ d = sqrt(x2 + y2) + sin = x / d; + cos = x / d; + Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos) +
theta
+ has the value:
+ ++ | cos(theta) -sin(theta) 0 | + | sin(theta) cos(theta) 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta 0 | + | sinTheta cosTheta 0 | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | cosTheta -sinTheta x-x*cos+y*sin | + | sinTheta cosTheta y-x*sin-y*cos | + | 0 0 1 | +
++ | xScale 0 dx | + | 1 yScale dy | + | 0 0 1 | +
+ Note that a shear of (1, 1) is not + equal to shear(1, 0) composed with shear(0, 1). + Instead, shear(1, 1) corresponds to a mapping onto the + line x = y. ++ | 1 xShear 0 | + | yShear 1 0 | + | 0 0 1 | +
++ | 1 0 dx | + | 1 0 dy | + | 0 0 1 | +
++ A.compose(B) = TB x TA +
++ A.composeBefore(B) = TA x TB +
dest coordinateCoordinateSequence
+ the index of the coordinate to transform
+
+ AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
+
+ + m00, m01, m02, m10, m11, m12 ++
++ | m00 m01 m02 | + | m10 m11 m12 | = m00 * m11 - m01 * m10 + | 0 0 1 | +
Polygon cannot be collapsed into a LineString).
+ If changing the structure is required, use a null if the geometry is to be deleted.
+ T elements from a single + |x.lo| <= 0.5*ulp(x.hi) ++ and ulp(y) means "unit in the last place of y". + The basic arithmetic operations are implemented using + convenient properties of IEEE-754 floating-point arithmetic. +
+ [+|-] {digit} [ . {digit} ] [ ( e | E ) [+|-] {digit}+
+
+ + sum = frac * this + (1 - frac) * v ++
index
+ LineStrings touch
+ only at their endpoints, use IsSimpleOp with {@link BoundaryNodeRule#ENDPOINT_BOUNDARY_RULE}.
+ For example, this can be used to validate that a set of lines form a topologically valid
+ linear network.
+ 
null
+ + LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, + 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031) ++
null if there is none0.0 returns the end point of the
+ segment; a fraction of 1.0 returns the start point of the segment.
+
+ StreamTokenizer tokenizer = new StreamTokenizer();
+ tokenizer.GrabWhitespace = true;
+ tokenizer.Verbosity = VerbosityLevel.Debug; // just for debugging
+ tokenizer.TextReader = File.OpenText(fileName);
+ Token token;
+ while (tokenizer.NextToken(out token)) log.Info("Token = '{0}'", token);
+
+
+ StreamTokenizer tokenizer = new StreamTokenizer("some string");
+ ArrayList tokens = new ArrayList();
+ if (!tokenizer.Tokenize(tokens))
+ {
+ // error handling
+ }
+ foreach (Token t in tokens) Console.WriteLine("t = {0}", t);
+
+ Algorithms.ReverseInPlace(Algorithms.Range(list, 3, 6))
+ will reverse the 6 items beginning at index 3.Algorithms.ReverseInPlace(Algorithms.Range(array, 3, 6))
+ will reverse the 6 items beginning at index 3.
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>(StringComparer.CurrentCultureIgnoreCase));
+
+
+ Dictionary<IEnumerable<string>, int> =
+ new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>());
+
+
+ List<int> list1, list2;
+ if (EqualCollections(list1, list2, delegate(int x, int y) { return x <= y; }) {
+ // the check is true...
+ }
+
+
+ List<double> list = new List<double>(Algorithms.NCopiesOf(1000, 1.0));
+ This method is not abstract, although derived classes should always + override it. It is not abstract because some derived classes may wish to reimplement + Add with a different return type (typically bool). In C#, this can be accomplished + with code like the following:
+
+ public class MyCollection<T>: CollectionBase<T>, ICollection<T>
+ {
+ public new bool Add(T item) {
+ /* Add the item */
+ }
+
+ void ICollection<T>.Add(T item) {
+ Add(item);
+ }
+ }
+
+ Insert(Count, item)
+ Algorithms.ReverseInPlace(deque.Range(3, 6))
+ will reverse the 6 items beginning at index 3.Insert(Count, item)
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Bag is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the bag.
+When multiple equal items are stored in the bag, they are stored as a representative item and a count. + If equal items can be distinguished, this may be noticable. For example, if a case-insensitive + comparer is used with a Bag<string>, and both "hello", and "HELLO" are added to the bag, then the + bag will appear to contain two copies of "hello" (the representative item).
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Algorithms.ReverseInPlace(list.Range(3, 6))
+ will reverse the 6 items beginning at index 3.The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedBag is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) + M time, where N is the number of keys in the tree, and M is the current number + of copies of the element being handled.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the bag while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the bag takes time O(N), where N is the number + of items in the bag.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in bag.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the bag while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Algorithms.Reverse(deque.Range(3, 6))
+ will return the reverse opf the 6 items beginning at index 3.Views are dynamic. If the underlying bag changes, the view changes in sync. If a change is made + to the view, the underlying bag changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedBag. For example:
+
+ foreach(T item in bag.Range(from, to)) {
+ // process item
+ }
+
+
+ bag.Range("A", "B").Clear();
+
+ The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Unlike adding or removing an element, changing the value associated with a key + can be performed while an enumeration (foreach) on the the dictionary is in progress.
+Equality between keys is determined by the comparison instance or delegate used + to create the dictionary.
+Replace takes time O(log N), where N is the number of entries in the dictionary.
Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the elements of the dictionary, which uses this method implicitly.
+If an element is added to or deleted from the dictionary while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the entries in the dictionary takes time O(N log N), where N is the number + of entries in the dictionary.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Reversed()) {
+ // process pair
+ }
+
If an entry is added to or deleted from the dictionary while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the dictionary, and the operation takes constant time.
+If
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, true, to, false)) {
+ // process pair
+ }
+
+ Calling Range does not copy the data in the dictionary, and the operation takes constant time.
The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, true)) {
+ // process pair
+ }
+
+ Calling RangeFrom does not copy of the data in the dictionary, and the operation takes constant time.
+The sorted order of the keys is determined by the comparison instance or delegate used + to create the dictionary.
+Typically, this property is used in conjunction with a foreach statement. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.RangeFrom(from, false)) {
+ // process pair
+ }
+
+ Calling RangeTo does not copy the data in the dictionary, and the operation takes constant time.
+Views are dynamic. If the underlying dictionary changes, the view changes in sync. If a change is made + to the view, the underlying dictionary changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the keys + and values in a subset of the OrderedMultiDictionary. For example:
+
+ foreach(KeyValuePair<TKey, TValue> pair in dictionary.Range(from, to)) {
+ // process pair
+ }
+
+
+ dictionary.Range("A", "B").Clear();
+
+ The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, + then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison + function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
+OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an + an element all are done in log(N) type, where N is the number of keys in the tree.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumeration all the items in the set takes time O(N log N), where N is the number + of items in the set.
+
+ OrderedSet<string> set = new OrderedSet<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+ Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Reversed()) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Reverse does not copy the data in the tree, and the operation takes constant time.
+If
Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.Range(from, true, to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling Range does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeFrom(from, true)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.
+Typically, this method is used in conjunction with a foreach statement. For example:
+
+ foreach(T item in set.RangeTo(to, false)) {
+ // process item
+ }
+
If an item is added to or deleted from the set while the View is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Calling RangeTo does not copy the data in the tree, and the operation takes constant time.
+Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made + to the view, the underlying set changes accordingly.
+Typically, this class is used in conjunction with a foreach statement to enumerate the items + in a subset of the OrderedSet. For example:
+
+ foreach(T item in set.Range(from, to)) {
+ // process item
+ }
+
+
+ set.Range("A", "B").Clear();
+
+ The items are compared in one of two ways. If T implements IComparable<T> + then the Equals method of that interface will be used to compare items, otherwise the Equals + method from Object will be used. Alternatively, an instance of IComparer<T> can be passed + to the constructor to use to compare items.
+Set is implemented as a hash table. Inserting, deleting, and looking up an + an element all are done in approximately constant time, regardless of the number of items in the Set.
+Typically, this method is not called directly. Instead the "foreach" statement is used + to enumerate the items, which uses this method implicitly.
+If an item is added to or deleted from the set while it is being enumerated, then + the enumeration will end with an InvalidOperationException.
+Enumerating all the items in the set takes time O(N), where N is the number + of items in the set.
+
+ Set<string> set = new Set<string>(StringComparer.CurrentCultureIgnoreCase);
+ set.Add("HELLO");
+ string s;
+ bool b = set.TryGetItem("Hello", out s); // b receives true, s receives "HELLO".
+
+