ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/ParallelDoubleArrayWithMapping.java
(Generate patch)

Comparing jsr166/src/extra166y/ParallelDoubleArrayWithMapping.java (file contents):
Revision 1.4 by jsr166, Wed Jul 4 20:13:53 2012 UTC vs.
Revision 1.6 by jsr166, Sun Jan 18 20:17:32 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package extra166y;
8 +
9   import jsr166y.*;
10   import static extra166y.Ops.*;
11   import java.util.*;
# Line 24 | Line 25 | public abstract class ParallelDoubleArra
25      }
26  
27      /**
28 <     * Applies the given procedure to mapped elements
28 >     * Applies the given procedure to mapped elements.
29       * @param procedure the procedure
30       */
31      public void apply(Procedure<? super U> procedure) {
# Line 32 | Line 33 | public abstract class ParallelDoubleArra
33      }
34  
35      /**
36 <     * Returns reduction of mapped elements
36 >     * Returns reduction of mapped elements.
37       * @param reducer the reducer
38       * @param base the result for an empty array
39       * @return reduction
# Line 47 | Line 48 | public abstract class ParallelDoubleArra
48      /**
49       * Returns mapping of some element matching bound and filter
50       * constraints, or null if none.
51 <     * @return mapping of matching element, or null if none.
51 >     * @return mapping of matching element, or null if none
52       */
53      public U any() {
54          int i = anyIndex();
# Line 55 | Line 56 | public abstract class ParallelDoubleArra
56      }
57  
58      /**
59 <     * Returns the minimum mapped element, or null if empty
59 >     * Returns the minimum mapped element, or null if empty.
60       * @param comparator the comparator
61       * @return minimum mapped element, or null if empty
62       */
# Line 65 | Line 66 | public abstract class ParallelDoubleArra
66  
67      /**
68       * Returns the minimum mapped element, or null if empty,
69 <     * assuming that all elements are Comparables
69 >     * assuming that all elements are Comparables.
70       * @return minimum mapped element, or null if empty
71 <     * @throws ClassCastException if any element is not Comparable.
71 >     * @throws ClassCastException if any element is not Comparable
72       */
73      public U min() {
74          return reduce((Reducer<U>)(CommonOps.castedMinReducer()), null);
75      }
76  
77      /**
78 <     * Returns the maximum mapped element, or null if empty
78 >     * Returns the maximum mapped element, or null if empty.
79       * @param comparator the comparator
80       * @return maximum mapped element, or null if empty
81       */
# Line 83 | Line 84 | public abstract class ParallelDoubleArra
84      }
85  
86      /**
87 <     * Returns the maximum mapped element, or null if empty
88 <     * assuming that all elements are Comparables
87 >     * Returns the maximum mapped element, or null if empty,
88 >     * assuming that all elements are Comparables.
89       * @return maximum mapped element, or null if empty
90 <     * @throws ClassCastException if any element is not Comparable.
90 >     * @throws ClassCastException if any element is not Comparable
91       */
92      public U max() {
93          return reduce((Reducer<U>)(CommonOps.castedMaxReducer()), null);
# Line 97 | Line 98 | public abstract class ParallelDoubleArra
98       * to locate minimum and maximum elements.
99       * @param comparator the comparator to use for
100       * locating minimum and maximum elements
101 <     * @return the summary.
101 >     * @return the summary
102       */
103      public ParallelArray.SummaryStatistics<U> summary
104          (Comparator<? super U> comparator) {
# Line 109 | Line 110 | public abstract class ParallelDoubleArra
110  
111      /**
112       * Returns summary statistics, assuming that all elements are
113 <     * Comparables
114 <     * @return the summary.
113 >     * Comparables.
114 >     * @return the summary
115       */
116      public ParallelArray.SummaryStatistics<U> summary() {
117          return summary((Comparator<? super U>)(CommonOps.castedComparator()));
118      }
119  
120      /**
121 <     * Returns a new ParallelArray holding elements
121 >     * Returns a new ParallelArray holding elements.
122       * @return a new ParallelArray holding elements
123       */
124      public ParallelArray<U> all() {
# Line 126 | Line 127 | public abstract class ParallelDoubleArra
127  
128      /**
129       * Returns a new ParallelArray with the given element type holding
130 <     * elements
130 >     * elements.
131       * @param elementType the type of the elements
132       * @return a new ParallelArray holding elements
133       */
# Line 137 | Line 138 | public abstract class ParallelDoubleArra
138      /**
139       * Returns an operation prefix that causes a method to operate
140       * on mapped elements of the array using the given op
141 <     * applied to current op's results
141 >     * applied to current op's results.
142       * @param op the op
143       * @return operation prefix
144       */
# Line 147 | Line 148 | public abstract class ParallelDoubleArra
148      /**
149       * Returns an operation prefix that causes a method to operate
150       * on mapped elements of the array using the given op
151 <     * applied to current op's results
151 >     * applied to current op's results.
152       * @param op the op
153       * @return operation prefix
154       */
# Line 157 | Line 158 | public abstract class ParallelDoubleArra
158      /**
159       * Returns an operation prefix that causes a method to operate
160       * on mapped elements of the array using the given op
161 <     * applied to current op's results
161 >     * applied to current op's results.
162       * @param op the op
163       * @return operation prefix
164       */
# Line 171 | Line 172 | public abstract class ParallelDoubleArra
172       * @param other the other array
173       * @return operation prefix
174       * @throws IllegalArgumentException if other array is a
175 <     * filtered view (all filters must precede all mappings).
175 >     * filtered view (all filters must precede all mappings)
176       */
177      public <V,W,X> ParallelDoubleArrayWithMapping<W> withMapping
178          (BinaryOp<? super U, ? super V, ? extends W> combiner,
# Line 188 | Line 189 | public abstract class ParallelDoubleArra
189       * @param other the other array
190       * @return operation prefix
191       * @throws IllegalArgumentException if other array is a
192 <     * filtered view (all filters must precede all mappings).
192 >     * filtered view (all filters must precede all mappings)
193       */
194      public <V> ParallelDoubleArrayWithMapping<V> withMapping
195          (ObjectAndDoubleToObject<? super U, ? extends V> combiner,
# Line 205 | Line 206 | public abstract class ParallelDoubleArra
206       * @param other the other array
207       * @return operation prefix
208       * @throws IllegalArgumentException if other array is a
209 <     * filtered view (all filters must precede all mappings).
209 >     * filtered view (all filters must precede all mappings)
210       */
211      public <V> ParallelDoubleArrayWithMapping<V> withMapping
212          (ObjectAndLongToObject<? super U, ? extends V> combiner,
# Line 223 | Line 224 | public abstract class ParallelDoubleArra
224       * @param other the other array
225       * @return operation prefix
226       * @throws IllegalArgumentException if other array is a
227 <     * filtered view (all filters must precede all mappings).
227 >     * filtered view (all filters must precede all mappings)
228       */
229      public <V,W> ParallelDoubleArrayWithDoubleMapping withMapping
230          (ObjectAndObjectToDouble<? super U, ? super V> combiner,
# Line 240 | Line 241 | public abstract class ParallelDoubleArra
241       * @param other the other array
242       * @return operation prefix
243       * @throws IllegalArgumentException if other array is a
244 <     * filtered view (all filters must precede all mappings).
244 >     * filtered view (all filters must precede all mappings)
245       */
246      public ParallelDoubleArrayWithDoubleMapping withMapping
247          (ObjectAndDoubleToDouble<? super U> combiner,
# Line 272 | Line 273 | public abstract class ParallelDoubleArra
273       * @param other the other array
274       * @return operation prefix
275       * @throws IllegalArgumentException if other array is a
276 <     * filtered view (all filters must precede all mappings).
276 >     * filtered view (all filters must precede all mappings)
277       */
278      public <V,W> ParallelDoubleArrayWithLongMapping withMapping
279          (ObjectAndObjectToLong<? super U, ? super V> combiner,
# Line 289 | Line 290 | public abstract class ParallelDoubleArra
290       * @param other the other array
291       * @return operation prefix
292       * @throws IllegalArgumentException if other array is a
293 <     * filtered view (all filters must precede all mappings).
293 >     * filtered view (all filters must precede all mappings)
294       */
295      public ParallelDoubleArrayWithLongMapping withMapping
296          (ObjectAndDoubleToLong<? super U> combiner,
# Line 306 | Line 307 | public abstract class ParallelDoubleArra
307       * @param other the other array
308       * @return operation prefix
309       * @throws IllegalArgumentException if other array is a
310 <     * filtered view (all filters must precede all mappings).
310 >     * filtered view (all filters must precede all mappings)
311       */
312      public ParallelDoubleArrayWithLongMapping withMapping
313          (ObjectAndLongToLong<? super U> combiner,
# Line 355 | Line 356 | public abstract class ParallelDoubleArra
356      /**
357       * Returns an Iterable view to sequentially step through mapped
358       * elements also obeying bound and filter constraints, without
359 <     * performing computations to evaluate them in parallel
359 >     * performing computations to evaluate them in parallel.
360       * @return the Iterable view
361       */
362      public Iterable<U> sequentially() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines