|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.amino.alg.scan.AbstractScanner
org.amino.alg.scan.ParallelScanner
public class ParallelScanner
Implementation of parallel scanner.
Constructor Summary | |
---|---|
ParallelScanner()
Creates a new parallel scanner, with default number of threads that equals to the the number of logical processors. |
|
ParallelScanner(int nthreads)
Creates a new parallel scanner, with the specified number of threads "nthreads". |
Method Summary | |
---|---|
int |
binarySearch(byte[] a,
int from,
int to,
byte v)
Search a byte value from byte-array. |
int[] |
findAll(byte[] a,
byte[] v,
int from,
int to)
Find the index of the any occurrence of the given sequence in an array segment. |
int[] |
findAll(byte[] a,
byte v,
int from,
int to)
Find the indices of all occurrences of the given value in an array segment. |
int |
findAny(byte[] a,
byte[] v,
int from,
int to)
Find the index of the any occurrence of the given sequence in an array segment. |
int |
findAny(byte[] a,
byte v,
int from,
int to)
Find the index of the any occurrence of the given value in an array segment. |
int |
findNext(byte[] a,
byte[] v,
int index)
Find the next index of the given sequence in the array. |
protected int |
findNext(byte[] a,
byte[] v,
int from,
int to)
Find the next index of the given value in the array. |
int |
findNext(byte[] a,
byte v,
int index)
Find the next index of the given value in the array. |
protected int |
findNext(byte[] a,
byte v,
int from,
int to)
Find the next index of the given value in the array. |
int |
findPrevious(byte[] a,
byte[] v,
int index)
Find the previous index of the given value in the array. |
protected int |
findPrevious(byte[] a,
byte[] v,
int from,
int to)
Find the previous index of the given value in the array. |
int |
findPrevious(byte[] a,
byte v,
int index)
Find the previous index of the given value in the array. |
protected int |
findPrevious(byte[] a,
byte v,
int from,
int to)
Find the previous index of the given value in the array. |
int |
replaceAll(byte[] a,
byte[] v,
byte[] r,
int from,
int to)
Replace all occurrences of the search sequence with the replacement sequence. |
int |
replaceAll(byte[] a,
byte v,
byte r,
int from,
int to)
Replace all occurrences of the search value with the replacement value. |
Methods inherited from class org.amino.alg.scan.AbstractScanner |
---|
binarySearch, findAll, findAll, findAny, findAny, findFirst, findFirst, findLast, findLast, replaceAll, replaceAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParallelScanner(int nthreads)
nthreads
- number of threads to do parallel scanpublic ParallelScanner()
Method Detail |
---|
public int[] findAll(byte[] a, byte v, int from, int to)
findAll
in interface Scanner
a
- The array to search.v
- The value to search for.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int[] findAll(byte[] a, byte[] v, int from, int to)
findAll
in interface Scanner
a
- The array to search.v
- The sequence to search for.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int findAny(byte[] a, byte v, int from, int to)
findAny
in interface Scanner
a
- The array to search.v
- The value to search for.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int findAny(byte[] a, byte[] v, int from, int to)
findAny
in interface Scanner
a
- The array to search.v
- The sequence to search for.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int findNext(byte[] a, byte v, int index)
findNext
in interface Scanner
a
- The array to search.v
- The value to search for.index
- The starting index for the search.
public int findNext(byte[] a, byte[] v, int index)
findNext
in interface Scanner
a
- The array to search.v
- The sequence to search for.index
- The starting index for the search (inclusive).
public int findPrevious(byte[] a, byte v, int index)
findPrevious
in interface Scanner
a
- The array to search.v
- The value to search for.index
- The starting index for the search (exclusive, searching
backward).
public int findPrevious(byte[] a, byte[] v, int index)
findPrevious
in interface Scanner
a
- The array to search.v
- The value to search for.index
- The starting index for the search (exclusive, searching
backward).
public int replaceAll(byte[] a, byte v, byte r, int from, int to)
replaceAll
in interface Scanner
a
- The array to search.v
- The sequence to search for.r
- The replacement sequence.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int replaceAll(byte[] a, byte[] v, byte[] r, int from, int to)
replaceAll
in interface Scanner
a
- The array to search.v
- The sequence to search for.r
- The replacement sequence.from
- starting index for search (inclusive)to
- ending index for search (exclusive)
public int binarySearch(byte[] a, int from, int to, byte v)
a
- The array to search.from
- starting index for search (inclusive)to
- ending index for search (exclusive)v
- The value to search for
protected int findNext(byte[] a, byte v, int from, int to)
a
- The array to search.v
- The value to search for.from
- The starting index for the search.to
- The ending index for the search.
protected int findNext(byte[] a, byte[] v, int from, int to)
a
- The array to search.v
- The value to search for.from
- The starting index for the search.to
- The ending index for the search.
protected int findPrevious(byte[] a, byte v, int from, int to)
a
- The array to search.v
- The value to search for.from
- The starting index for the search (exclusive, searching
backward).to
- The ending index for the search (exclusive, searching
backward).
protected int findPrevious(byte[] a, byte[] v, int from, int to)
a
- The array to search.v
- The value to search for.from
- The starting index for the search (exclusive, searching
backward).to
- The ending index for the search (exclusive, searching
backward).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |