Feelin' Fly
The Random Vacationator
LET'S GET FLY
Where will the world take you next? Enter your name to get started
Start!

WANNA GO AGAIN?
Retry!


Class WordLevelParallelism
- java.lang.Object
-
- algorithms.misc.WordLevelParallelism
-
public class WordLevelParallelism extends java.lang.Object
word-level parallel operations. useful for classes such as the FusionTree.methods are implemented following lecture notes in http://web.stanford.edu/class/cs166/ and ____ add other reference --- The MSB methods are ports of the c code at http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp refactored here to use a variable tile size.
-
-
Constructor Summary
Constructors Constructor Description WordLevelParallelism()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static long
createTiledBitMask1(int nTiles, int bitstringLength)
create a bitmask array of set bits at the location of separators in the concatenation of nTiles of length bitstringLength.static long
createTiledBitstring0(int[] values, int bitstringLength)
given an array of bitstringLength values, concatenate them and insert 0's on the high end of each value.static long
createTiledBitstring1(int value, int nTiles, int bitstringLength)
given a bitstring called value which is much smaller than a machine word, create a bitarray (word) with nTiles number of copies of value, concatenated, with 1's in between them and on the high end.static long
highestBitSetIn(long value, int valueBitLength)
Given an n-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn1(long value)
(package private) static long
highestBitSetIn2(long value)
(package private) static long
highestBitSetIn3(long value)
Given a 3-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn4(long value)
Given a 4-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn5(long value)
Given a 5-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn6(long value)
Given a 6-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn7(long value)
Given a 7-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBitSetIn8(long value)
Given an 8-bit value, returns the index of the highest 1 bit within that value.(package private) static long
highestBlockSetIn(long tiled, int nTiles, int tileBitLength)
Given a 64-bit integer, returns the index of the block within that integer that contains a 1 bit, where the index is zero-based numbering.static long
highestOneBitIn(long tiled)
finds the highest set bit in the bitstring tiled.static long
highestOneBitIn(long tiled, int nTiles, int tileBitLength)
finds the highest set bit in the bitstring tiled.static int
maxNumberOfTiles(int blockSize)
returns the maximum number of blockSize tiles that can fit into a java unsigned long (= 63 bits).static long
parallelCompare00(long tiled1, long tiled2, int nTiles, int tileBitLength)
parallel compare of tiled1 to tiled2 and return a masked bit array whose set bits indicate which tiles of tiled1 are .gte.static long
parallelCompare008(long tiled1, long tiled2, int nTiles)
parallel compare of tiled1 to tiled2 which both have block sizes of 8 and have flag bits of '0' separating the embedded 7-bit tiles.(package private) static long
parallelCompare108(long tiled1, long tiled2, int nTiles, long mask1)
parallel compare of tiled1 to tiled2 both of which have block size 8 and embedded tiles of size 7-bits.(package private) static long
parallelSum(long comparison, int nTiles, int tileBitLength)
sum the set bits of bitstring comparison.(package private) static long
parallelSum8(long comparison, int nTiles)
sum the set bits of the comparison bitstring which has a block size of 8 and embedded tiles of size 7-bits.static long
rank(long tiled1, long tiled2, int nTiles, int tileBitLength)
parallel compare of tiled1 to tiled2 and return a masked bit array whose set bits indicate which tiles of tiled1 are .gte.static long
rank(long tiled1, long tiled2, int nTiles, int tileBitLength, long mask1)
calculate the rank of the replicated query tile in tiled1 with respect to the tiled keys in tiled2.static long
sketch(long tiled, int nTiles, int tileBitLength)
given a bitarray packed full of tiles separated by flags, extract and return the flags.static long
sketch2(long tiled)
given a bitarray packed full of tiles separated by flags with a block size of bits and embedded tile size of 1 bits, extract and return the flags as consecutive bits.static long
sketch3(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 3 bits and embedded tile size of 2 bits, extract and return the flags as consecutive bits.static long
sketch4(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 4 bits and embedded tile size of 3 bits, extract and return the flags as consecutive bits.static long
sketch5(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 5 bits and embedded tile size of 4 bits, extract and return the flags as consecutive bits.static long
sketch6(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 6 bits and embedded tile size of 5 bits, extract and return the flags as consecutive bits.static long
sketch7(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 7 bits and embedded tile size of 6 bits, extract and return the flags as consecutive bits.static long
sketch8(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 8 bits and embedded tile size of 7 bits, extract and return the flags as consecutive bits.static long
usedBlocksIn(long value, int blockSize)
Returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise.(package private) static long
usedBlocksIn1(long value)
(package private) static long
usedBlocksIn2(long value)
(package private) static long
usedBlocksIn3(long value)
(package private) static long
usedBlocksIn4(long value)
(package private) static long
usedBlocksIn5(long value)
(package private) static long
usedBlocksIn6(long value)
For a tiled value whose block size = 6 bits (and hence, the embedded tile size is 5 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise.(package private) static long
usedBlocksIn7(long value)
For a tiled value whose block size = 7 bits (and hence, the embedded tile size is 6 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise.(package private) static long
usedBlocksIn8(long value)
For a tiled value whose block size = 8 bits (and hence, the embedded tile size is 7 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise.
-
-
-
Method Detail
-
highestOneBitIn
public static long highestOneBitIn(long tiled)
finds the highest set bit in the bitstring tiled. the method is a.k.a. MSB. MSB(tiled) is the largest value of k such that 2^k ≤ tiled. uses O(1) machine operations and O(1) space.reference http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp then edited here for variable block size and number of tiles packed into tiled. see also lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf
An example of where MSB is used: In the sparse table Range Minimum Queries (RMQ) structure, where computing RMQ(i, j) requires computing the largest number k where 2^k ≤ (j–i+1), k = msb(j – i + 1).- Parameters:
tiled
- a bitarray of concatenated bitstrings of length tileBitLength separated by flag bits. the portion of tiled read is the first nTiles * (tileBitLength + 1) bits.- Returns:
- the index of the highest nonzero bit in tiled. returns a negative number if no bits are set in tiled.
-
highestOneBitIn
public static long highestOneBitIn(long tiled, int nTiles, int tileBitLength)
finds the highest set bit in the bitstring tiled. the method is a.k.a. MSB. MSB(tiled) is the largest value of k such that 2^k ≤ tiled. uses O(1) machine operations and O(1) space.reference http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp then edited here for variable block size and number of tiles packed into tiled. see also lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf
An example of where MSB is used: In the sparse table Range Minimum Queries (RMQ) structure, where computing RMQ(i, j) requires computing the largest number k where 2^k ≤ (j–i+1), k = msb(j – i + 1). The operation is ~33 to a few times that operations. Consider using instead Long.highestOneBitIn() which uses the Henry S. Warren, Jr.'s Hacker's Delight bit twiddling for 14 operations.- Parameters:
tiled
- a bitarray of concatenated bitstrings of length tileBitLength separated by flag bits. the portion of tiled read is the first nTiles * (tileBitLength + 1) bits.nTiles
- the number of tiles packed into the bitarray tiled.tileBitLength
- the size of a tile before a gap is appended to it. the block size is tileBitlength + 1.- Returns:
- the index of the highest nonzero bit in tiled. returns a negative number if no bits are set in tiled.
-
highestBlockSetIn
static long highestBlockSetIn(long tiled, int nTiles, int tileBitLength)
Given a 64-bit integer, returns the index of the block within that integer that contains a 1 bit, where the index is zero-based numbering.reference http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp then edited here for variable block size and number of tiles packed into tiled. see also lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf
the method is ~ 21 operations.- Parameters:
tiled
- the bitarray of tiled integers.nTiles
- the number of tiles embedded in tiled.tileBitLength
- the length of each tile in tiled, not counting the surrounding single flag bits. the block size is tileBitLength + 1.- Returns:
- return the largest index of the block within tiled that contains a set bit, else returns a negative number if there are no set bits in tiled. the block size is tileBitLength + 1.
-
createTiledBitstring0
public static long createTiledBitstring0(int[] values, int bitstringLength)
given an array of bitstringLength values, concatenate them and insert 0's on the high end of each value. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled1 is 0b0010010001100111, where 0's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bistringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (values.length * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent values.length is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from values array in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.
following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
values
- array of bitstrings, each of length bitstringLengthbitstringLength
- the bitlength of each value in values. the tile for each will be bitstringLength + 1 bits long. the total tiled result will be values.length * (bitstringLength + 1) bits.- Returns:
- the bitarray holding the bitarray of replicated values with '0' separators.
-
createTiledBitMask1
static long createTiledBitMask1(int nTiles, int bitstringLength)
create a bitmask array of set bits at the location of separators in the concatenation of nTiles of length bitstringLength. e.g. for nTiles=2 and bitstringLength=7, the resulting bitmask is 0b1000000010000000 which is 16 bits. NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bistringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
nTiles
- the number of tiles of bitstringLength for which this mask will be calculated.bitstringLength
- the bit-length of each tile- Returns:
- the bitarray holding the bitarray of '1' separators for nTiles of length bitstringLength. e.g. for nTiles=2 and bitstringLength=7, the resulting bitmask is 0b1000000010000000 which is 16 bits.
-
createTiledBitstring1
public static long createTiledBitstring1(int value, int nTiles, int bitstringLength)
given a bitstring called value which is much smaller than a machine word, create a bitarray (word) with nTiles number of copies of value, concatenated, with 1's in between them and on the high end. e.g. for 7-bit value 0b1100111 and nTiles=2, the returned bitarray would be 0b1110011111100111. NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bitstringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- bitstring of length .lte. bitstringLengthnTiles
- the number of copies of value to set in the returned bitarraybitstringLength
- the length of tiling before the 1's are concatenated as separators. e.g. for a bitstringLength of 5 and nTiles=10, the resulting bitarray is length 10*(5+1)=60 bits- Returns:
- the bitarray holding the bitarray of replicated values with '1' separators.
-
parallelCompare00
public static long parallelCompare00(long tiled1, long tiled2, int nTiles, int tileBitLength)
parallel compare of tiled1 to tiled2 and return a masked bit array whose set bits indicate which tiles of tiled1 are .gte. the tiles of tiled2 in the same position.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bitstringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.- Parameters:
tiled1
- a bit array holding numbers of length tileBitLength (called tiles) separated by 0's. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled1 is 0b0010010001100111, where 0's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.tiled2
- a bit array holding numbers of length tileBitLength separated by 0's.nTiles
- the number of tiles in the bitarray tiled1 or tiled2 (which should be the same number of tiles).tileBitLength
- the length of each tile in the bit arrays.- Returns:
- a bit array of same size as tiled1 and tiled2 in which the bit of each tile is 1 if the tile in tiled1 1 is greater than or equal to the tile at the same position in tiled2.
-
parallelCompare008
public static long parallelCompare008(long tiled1, long tiled2, int nTiles)
parallel compare of tiled1 to tiled2 which both have block sizes of 8 and have flag bits of '0' separating the embedded 7-bit tiles. returns a masked bit array whose set bits indicate which tiles of tiled1 are .gte. the tiles of tiled2 in the same position.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bitstringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.- Parameters:
tiled1
- a bit array holding numbers of length tileBitLength (called tiles) separated by 0's. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled1 is 0b0010010001100111, where 0's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.tiled2
- a bit array holding numbers of length tileBitLength separated by 0's.nTiles
- the number of tiles in the bitarray tiled1 or tiled2 (which should be the same number of tiles).- Returns:
- a bit array of same size as tiled1 and tiled2 in which the bit of each tile is 1 if the tile in tiled1 1 is greater than or equal to the tile at the same position in tiled2.
-
rank
public static long rank(long tiled1, long tiled2, int nTiles, int tileBitLength, long mask1)
calculate the rank of the replicated query tile in tiled1 with respect to the tiled keys in tiled2. This method performs a parallel compare of tiled1 to tiled2, masks the result, and then sums the number of set bits in the masked result. The calculated rank requires that the keys embedded in tiled2 are ordered. The calculated rank is the number of flags of blocks in tiled2 that are less than or equal to those in the query (which is replicated in tiled1). The method is O(1) (5 operations).following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
tiled1
- a bit array holding numbers of length tileBitLength (called tiles) separated by 1's. e.g. For bitstring 0b0010100 replicated 2 times using a bitlength of 7 bits, the resulting tiled1 is bitstring of length 16 bits which has 2 blocks of size 8 bits, = 0b10010100_10010100.tiled2
- a bit array holding numbers of length tileBitLength separated by 0's. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled2 is 0b00100100_01100111, where 0's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.nTiles
-tileBitLength
- the length of each tile in the bit arrays. the block size is tileBitLength + 1 because it includes the gap bit between tiles.mask1
- the 1's mask (same used in setting the gap bits in tiled1)- Returns:
- The calculated rank is the number of flags of blocks in tiled2 that are less than or equal to those in the query (which is replicated in tiled1).
-
rank
public static long rank(long tiled1, long tiled2, int nTiles, int tileBitLength)
parallel compare of tiled1 to tiled2 and return a masked bit array whose set bits indicate which tiles of tiled1 are .gte. the tiles of tiled2 in the same position.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bistringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.- Parameters:
tiled1
- a bit array holding numbers of length tileBitLength (called tiles) separated by 1's. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled1 is 0b1010010011100111, where 1's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.tiled2
- a bit array holding numbers of length tileBitLength separated by 0's.nTiles
-tileBitLength
- the length of each tile in the bit arrays. the block size is tileBitLength + 1 because it includes the gap bit between tiles.- Returns:
- a bit array of same size as tiled1 and tiled2 in which the bit of each tile is 1 if the tile in tiled1 1 is greater than or equal to the tile at the same position in tiled2.
-
parallelCompare108
static long parallelCompare108(long tiled1, long tiled2, int nTiles, long mask1)
parallel compare of tiled1 to tiled2 both of which have block size 8 and embedded tiles of size 7-bits. this method returns a masked bit array whose set bits indicate which tiles of tiled1 are .gte. the tiles of tiled2 in the same position.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
NOTE that there are some size restrictions to the packing especially in context of further use such as the compare operations. Let block size = (bistringLength + 1). The unsigned long restricts the total bit length of the tiled result of this method to 63 bits, and so (nTiles * block) must be less than or equal to 63. Also, regarding the number of values to be tiled: the compare operation has to be able to store the bit representation of the number of tiles into the highest blocks of a mask that is the same size as the total tiled bit length. If the number of bits needed to represent nTiles is not less than or equal to block size, then more blocks are needed to hold that number and that number of extra blocks may need to be subtracted from nTiles in order for the compare bitMask to fit within the limits of the tiled bit length and the 63 bit limit.- Parameters:
tiled1
- a bit array holding numbers of length tileBitLength (called tiles) separated by 1's. e.g. For bitstrings 0b0100100 and 0b1100111 which are 7 bits long, tiled1 is 0b1010010011100111, where 1's have been concatenated onto the high end of each tileBitLength bitstring, making a bitstring of length 16.tiled2
- a bit array holding numbers of length tileBitLength separated by 0's.nTiles
-mask1
- the 1's mask (same used in setting the gap bits in tiled1)- Returns:
- a bit array of same size as tiled1 and tiled2 in which the bit of each tile is 1 if the tile in tiled1 1 is greater than or equal to the tile at the same position in tiled2.
-
parallelSum
static long parallelSum(long comparison, int nTiles, int tileBitLength)
sum the set bits of bitstring comparison. the flags that may have set bits are the MSB of each block.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
This is 3 operations.- Parameters:
comparison
- a bit array with flags at the MSB of each block. The flags that are set bits are summed in this method.nTiles
-tileBitLength
- the length of each tile in the bit arrays. the block size is tileBitLength + 1 because it includes the gap bit between tiles.- Returns:
- a bit array of same size as tiled1 and tiled2 in which the bit of each tile is 1 if the tile in tiled1 1 is greater than or equal to the tile at the same position in tiled2.
-
parallelSum8
static long parallelSum8(long comparison, int nTiles)
sum the set bits of the comparison bitstring which has a block size of 8 and embedded tiles of size 7-bits. this method sums the set bits at the high end of each block and returns the result.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
this is ~ 6 operations.- Parameters:
comparison
- a bit array with flags at the MSB of each block. The flags that are set bits are summed in this method.nTiles
-- Returns:
- the sum of the set bits of the MSB of each 8-bit block.
-
sketch
public static long sketch(long tiled, int nTiles, int tileBitLength)
given a bitarray packed full of tiles separated by flags, extract and return the flags. e.g. if tiled were A0000000B0000000C0000000D0000000, this method would return ABCD. This is also known as "parallel pack".references: lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
The method is ~ 3 operations.- Parameters:
tiled
- a bitarray of concatenated bitstrings of length tileBitLength separated by flag bits. the portion of tiled read is the first nTiles * (tileBitLength + 1) bits.nTiles
- the number of tiles packed into the bitarray tiled.tileBitLength
- the size of a tile before a gap is appended to it. the block size is tileBitlength + 1.- Returns:
-
sketch8
public static long sketch8(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 8 bits and embedded tile size of 7 bits, extract and return the flags as consecutive bits. e.g. if tiled were A0000000B0000000C0000000D0000000, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 7 bits and embedded tile size of 6 bitsnTiles
-- Returns:
-
sketch7
public static long sketch7(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 7 bits and embedded tile size of 6 bits, extract and return the flags as consecutive bits. e.g. if tiled were A000000B000000C000000D000000, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8. also used https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 7 bits and embedded tile size of 6 bitsnTiles
- the number of tiles of block size 7 embedded in tiled. maximum nTiles is 9.- Returns:
-
sketch6
public static long sketch6(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 6 bits and embedded tile size of 5 bits, extract and return the flags as consecutive bits. e.g. if tiled were A00000B00000C00000D00000, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8. also used https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 6 bits and embedded tile size of 5 bitsnTiles
- the number of tiles of block size 6 embedded in tiled. the maximum number for the java unsigned long is 10 tiles of block size 6.- Returns:
-
sketch5
public static long sketch5(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 5 bits and embedded tile size of 4 bits, extract and return the flags as consecutive bits. e.g. if tiled were A0000B0000C0000D0000, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8. also used https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 5 bits and embedded tile size of 4 bitsnTiles
- the number of tiles of block size 5 embedded in tiled. the maximum number of 12 for nTiles for block size of 5 is limited by the java unsigned long and the location of the mask bits needed after the sketch multiplier.- Returns:
-
sketch4
public static long sketch4(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 4 bits and embedded tile size of 3 bits, extract and return the flags as consecutive bits. e.g. if tiled were A000B000C000D000, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8. also used https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 4 bits and embedded tile size of 3 bitsnTiles
- the number of tiles of block size 4 embedded in tiled. the maximum number of 15 for nTiles for block size of 4 is limited by the java unsigned long and the location of the mask bits needed after the sketch multiplier.- Returns:
-
sketch3
public static long sketch3(long tiled, int nTiles)
given a bitarray packed full of tiles separated by flags with a block size of 3 bits and embedded tile size of 2 bits, extract and return the flags as consecutive bits. e.g. if tiled were A00B00C00D00, this method would return ABCD.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8. also used https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 3 bits and embedded tile size of 2 bitsnTiles
- the number of tiles of block size 3 embedded in tiled. the maximum number of 21 for nTiles for block size of 3 is limited by the java unsigned long and the location of the mask bits needed after the sketch multiplier.- Returns:
-
sketch2
public static long sketch2(long tiled)
given a bitarray packed full of tiles separated by flags with a block size of bits and embedded tile size of 1 bits, extract and return the flags as consecutive bits. e.g. if tiled were A0B0C0D0, this method would return ABCD.reference: https://stackoverflow.com/questions/30539347/2d-morton-code-encode-decode-64bits
- Parameters:
tiled
- a bitarray packed full of tiles separated by flags with a block size of 2 bits and embedded tile size of 1 bits- Returns:
-
highestBitSetIn
public static long highestBitSetIn(long value, int valueBitLength)
Given an n-bit value, returns the index of the highest 1 bit within that value. the input is not tiled.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- a bitlength number.valueBitLength
- the bit length of value. range is [1,8] inclusive- Returns:
- the highest bit set in value. the bit number is w.r.t. 0. e.g. if blockSize is 8, the return value range is [0,7] inclusive. the result is a negative number if there are no bits set in value.
-
highestBitSetIn8
static long highestBitSetIn8(long value)
Given an 8-bit value, returns the index of the highest 1 bit within that value.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
This subroutine is where much of the magic happens with regards to the overall algorithm. The idea is that if we can get down to an eight-bit number, we can manually check each power of two that could serve as the most-significant bit. This is actually done using a clever parallel comparison step, describe below. this is ~10 operations.- Parameters:
value
- an 8-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn7
static long highestBitSetIn7(long value)
Given a 7-bit value, returns the index of the highest 1 bit within that value.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- a 7-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn6
static long highestBitSetIn6(long value)
Given a 6-bit value, returns the index of the highest 1 bit within that value.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- a 6-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn5
static long highestBitSetIn5(long value)
Given a 5-bit value, returns the index of the highest 1 bit within that value.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- a 5-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn4
static long highestBitSetIn4(long value)
Given a 4-bit value, returns the index of the highest 1 bit within that value.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
- a 4-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn3
static long highestBitSetIn3(long value)
Given a 3-bit value, returns the index of the highest 1 bit within that value.- Parameters:
value
- a 3-bit number- Returns:
- the highest set bit in value, or -1 for no set bits
-
highestBitSetIn2
static long highestBitSetIn2(long value)
-
highestBitSetIn1
static long highestBitSetIn1(long value)
-
usedBlocksIn
public static long usedBlocksIn(long value, int blockSize)
Returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise. All remaining bits are 0. Stated differently, given the input aaaaaaaabbbbbbbbccccccccddddddddeeeeeeeeffffffffgggggggghhhhhhhh We'll return a 64-bit flag integer A0000000B0000000C0000000D0000000E0000000F0000000G0000000H0000000 where each letter is 1 if any of the bits in the block were set and is 0 otherwise.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
-blockSize
-- Returns:
-
usedBlocksIn8
static long usedBlocksIn8(long value)
For a tiled value whose block size = 8 bits (and hence, the embedded tile size is 7 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise. All remaining bits are 0. Stated differently, given the input aaaaaaaabbbbbbbbccccccccddddddddeeeeeeeeffffffffgggggggghhhhhhhh We'll return a 64-bit flag integer A0000000B0000000C0000000D0000000E0000000F0000000G0000000H0000000 where each letter is 1 if any of the bits in the block were set and is 0 otherwise.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
The method is 5 operations.- Parameters:
value
-- Returns:
-
usedBlocksIn7
static long usedBlocksIn7(long value)
For a tiled value whose block size = 7 bits (and hence, the embedded tile size is 6 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise. All remaining bits are 0. Stated differently, given the input aaaaaaabbbbbbbcccccccdddddddeeeeeeefffffffggggggghhhhhhh We'll return a 64-bit flag integer A000000B000000C000000D000000E000000F000000G000000H000000 where each letter is 1 if any of the bits in the block were set and is 0 otherwise.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
-- Returns:
-
usedBlocksIn6
static long usedBlocksIn6(long value)
For a tiled value whose block size = 6 bits (and hence, the embedded tile size is 5 bits in between flags of size 1), returns a bitmask where each block's high bit is 1 if that block contains a 1 bit and is 0 otherwise. All remaining bits are 0. Stated differently, given the input aaaaaabbbbbbccccccddddddeeeeeeffffffgggggghhhhhh We'll return a 64-bit flag integer A00000B00000C00000D00000E00000F00000G00000H00000 where each letter is 1 if any of the bits in the block were set and is 0 otherwise.following lecture notes http://web.stanford.edu/class/cs166/lectures/16/Small16.pdf and code in http://web.stanford.edu/class/cs166/lectures/16/code/msb64/MSB64.cpp Then edited here to allow block sizes other than 8.
- Parameters:
value
-- Returns:
-
usedBlocksIn5
static long usedBlocksIn5(long value)
-
usedBlocksIn4
static long usedBlocksIn4(long value)
-
usedBlocksIn3
static long usedBlocksIn3(long value)
-
usedBlocksIn2
static long usedBlocksIn2(long value)
-
usedBlocksIn1
static long usedBlocksIn1(long value)
-
maxNumberOfTiles
public static int maxNumberOfTiles(int blockSize)
returns the maximum number of blockSize tiles that can fit into a java unsigned long (= 63 bits).- Parameters:
blockSize
- the size of blocks- Returns:
- the maximum number of blockSize tiles that can fit into a java unsigned long (= 63 bits).
-
-


The Locator component can be used to find your whereabouts on the planet using either your device's GPS or information from your network.
loc = app.CreateLocator(
type,
options )
→
app object: Locator
The provider specifies where the locator should retreive its information from . “Network” means get the location from the cell network and wifi, “GPS” tells the locator to use the device's GPS
To Start the locator use the Start method. You can also stop it with Stop.
To get regulat updates about your current positino use the SetOnChange function.
Example - Get Location Updates
function OnStart()
{
loc = app.CreateLocator("GPS,Network");
loc.SetOnChange(loc_OnChange);
loc.Start();
app.ShowPopup("Locating");
}
function loc_OnChange(pos)
{
var msg = pos.latitude + ", " + pos.longitude;
app.ShowPopup( msg );
}
Methods
The following methods are available on the Locator object:
number
number: seconds
string: comma “,” separated
string: comma “,” separated: “GPS”, “Network”
loc.GetBearingTo
Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location.
loc.GetDistanceTo
Returns the approximate distance in meters between this location and the given location.
loc.GetType
Returns the control class name.
loc.SetOnChange
Define a function which is called when some of the values changed.
loc.SetRate
Set Locator update frequency in seconds
loc.Start
Start the locator.
loc.Stop
Stop the locator.


Playground
Save
Run
Restart
Stop
Export Bundle
{{session.username}}
Sign out
{{error}}
Export Bundle
Name
Symbolic Name
Version
Vendor
Copyright
Cancel
Export


|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.numericalmethod.suanshu.analysis.differentiation.Ridders
public class Ridders
This class computes the numerical derivative of a function using Ridders' method.
This method in general gives a higher precision than the simple finite differencing method,
c.f., FiniteDifference
.
Ridders' method tries a sequence of decreasing h
's to compute the derivatives,
and then extrapolate to zero using Neville's algorithm.
The choice of the initial h
is critical.
If h
is too big, the value computed could be inaccurate.
If h
is too small, due to rounding error, we might be computing the "same" value over and over again for different h
's.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function |
|---|
Function.EvaluationException |
| Field Summary | |
|---|---|
RealScalarFunction |
f
the function to take the derivative of |
static int |
N_POINTS_4_EXTRAPOLATION
the default number of points for extrapolation |
int |
nPoints4Extrapolation
the number of points for extrapolation |
int |
order
the order of the derivative |
double |
rate
the rate at which h decreases |
| Constructor Summary | |
|---|---|
Ridders(RealScalarFunction f,
int[] varidx)
Construct the derivative function of a real vector-valued function using Ridder's method. |
|
Ridders(RealScalarFunction f,
int[] varidx,
double rate,
int nPoints4Extrapolation)
Construct the derivative function of a real vector-valued function using Ridder's method. |
|
Ridders(UnivariateRealFunction f,
int order)
Construct the derivative function of a univariate function using Ridder's method. |
|
Ridders(UnivariateRealFunction f,
int order,
double rate,
int nPoints4Extrapolation)
Construct the derivative function of a univariate function using Ridder's method. |
| Method Summary | |
|---|---|
int |
dimension4Domain()
Get the number of variables of the function. |
int |
dimension4Range()
Get the dimension of the range space the function. |
double |
evaluate(double... x)
A real function, f , takes a double array double[],
{x0 , x1 , ..., xn}
and maps it to a double,
f(x0, x1, ..., xn) |
double |
evaluate(double[] x,
double h)
Numerically evaluate the derivative of f at point x with step size h . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int N_POINTS_4_EXTRAPOLATION
public final RealScalarFunction f
public final int order
public final double rate
h
decreases
public final int nPoints4Extrapolation
| Constructor Detail |
|---|
public Ridders(UnivariateRealFunction f, int order, double rate, int nPoints4Extrapolation)
f
- the UnivariateRealFunction
to take derivative oforder
- the order of differentiationrate
- the rate at which the increment h
decreases;
rate
should be a simple number such as 0.75, not like 0.66666666666...nPoints4Extrapolation
- number of points used for extrapolationpublic Ridders(UnivariateRealFunction f, int order)
f
- the UnivariateRealFunction
to take derivative oforder
- the order of the derivativepublic Ridders(RealScalarFunction f, int[] varidx, double rate, int nPoints4Extrapolation)
For example,
varidx = new int[]{1, 2}
means
∂f
fx1,x2 = -------
∂x2∂x1
∂ ∂
= ---( ---- )
∂x2 ∂x1
The indices count from 1 up to the number of variables of f
,
i.e., the domain dimension of f
.
f
- the real multivariate function to take derivative ofvaridx
- specify the variable indices, numbering from 1 up to the domain dimension of f
rate
- rate
should be a simple number, not like 0.66666666666...nPoints4Extrapolation
- number of points used for extrapolationpublic Ridders(RealScalarFunction f, int[] varidx)
For example,
varidx = new int[]{1, 2}
means
∂f
fx1,x2 = -------
∂x2∂x1
∂ ∂
= ---( ---- )
∂x2 ∂x1
The indices count from 1 up to the number of variables of f
,
i.e., the domain dimension of f
.
f
- the real multivariate function to take derivative ofvaridx
- specify the variable indices, numbering from 1 up to the domain dimension of f
| Method Detail |
|---|
public double evaluate(double... x)
f
, takes a double array double[],
and maps it to a double,{x0
,x1
, ...,xn}
f(x0, x1, ..., xn)
Make sure that h
and x+h
are representable in floating point precision
so that the difference between x+h
and x
is exactly h
, the step size.
evaluate
in interface RealScalarFunction
x
- the point to evaluate the derivative of f
at
f
at point x
using Ridders' methodpublic double evaluate(double[] x, double h)
f
at point x
with step size h
.
Automatically determining the step size h
could be challenging, esp. for when |x|
is near 0.
An analysis that involves f'
and f''
may be needed to determine the step size.
User may want to experiment with different h
s by calling this function.
x
- the point to evaluate f
ath
- step size
f
at point x
with step size h
using Ridders' methodpublic int dimension4Domain()
Function
For example, for a univariate function, the domain dimension is 1. For a bivariate function, the domain dimension is 2.
dimension4Domain
in interface Function
public int dimension4Range()
Function
For example, for a Rn->Rm function, the dimension of the range is m
.
dimension4Range
in interface Function
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


THE OTHER SISTER A film review by Matt Williams
RATING: * * out of * * * *
It is apparent that the makers of The Other Sister intended their film to be a thoughtful comedy-drama exploring the subjects of love and mental retardation. But, the film's depiction of mental retardation never rises above a simple gimmick. The end result is slightly condescending to the audience (and its characters), and robs the film from any hope of its intended dramatic impact. However, The Other Sister is still able to skate by (barely) on the merits of its comedy.
The main character of The Other Sister is Carla Tate (Juliette Lewis), a mentally retarded teen who has just returned home from an institution. Her rich parents, Elizabeth (Diane Keaton) and Radley (Tom Skerritt), don't quite know what to do with her. Carla's goal is to get a high school diploma and become a veterinarian's assistant. Elizabeth thinks that's out of the question.
But Carla is determined to declare her independence, whether her parents approve or not. Soon, she's enrolled in the local PolyTechnic school, and hunting for an apartment of her own.
 The two form a quick friendship, and fall in love. But when the topics of sex and marriage are raised, Carla's parents are at a complete loss.
Juliette Lewis and Giovanni Ribisi apparently attended the same acting class on the subject of portraying the mentally handicapped. They both deliver the same affectations, and an overabundance of mannerisms that bely a true lack of confidence in their characterizations. They are never able to get lost in the characters; in each and every scene, you are always acutely aware that you're watching someone acting.
The script provides them plenty of crutches to work with: She has a childlike affinity for animals, and he has a childlike affinity for marching bands. She throws a childlike tantrum when people laugh at her, he throws a childlike tantrum when he is called "stupid". But these lovable quirks are the end-all and be-all of their characters. And it doesn't end with Carla and Danny...every single character in the film can be singularly identified by a defining quirk.
The Other Sister has its cute moments, several of which actually do work. However, the majority of the movie is elaborately over-staged. The film is perfectly willing to sacrifice believability for a quick laugh.
The movie is also surprisingly long. It clocks in at over two hours, an excessive amount of time for what is in actuality a simple romantic comedy.
The Other Sister is much too self-conscious to pack any dramatic weight. But, as a lightweight, throwaway romantic comedy it's harmlessly entertaining.
Copyright 1999 Matt Williams
- Matt Williams<EMAIL_ADDRESS>Reviewer for Cinematter: http://www.cinematter.com Home of nearly 700 reviews, and information on over 750 upcoming releases
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This document describes the changes to the type system of the CLR to support generics (generic type definitions and generic methods). This design has the following aims:
For concreteness, code fragments are written in a "C# with generics" pseudo-code.
A generic type definition is a class, interface, or value type definition with formal generic parameters. These generic parameters represent types. Each generic parameter has a name, and optionally constraints that must be interface or class types. The generic parameter is in scope in the declarations of:
Some examples are shown in Section 3.
The following restrictions are enforced:
class C<T> : C<C<T>>
class C<T> : C<String>
class C<T> : D<String> class D<T> : C<String>
class C<T> : D<C<T>> class D<T> : C<D<T>>
The grammar of types in the CLR is extended in the following ways.
Given a generic class, interface or value
type definition, the generic parameters can be bound to actual
generic arguments (i.e. types) to produce a generic type instantiation.
The number of arguments must match the number of generic parameters specified
in the generic type definition, and the constraints on the generic parameters
must be observed. Examples:
Queue<String> Pair<int,Object> Pair<int,Pair<int,String>> IEnumerable<float> ICloneable<Queue<String>> Vec3<double>
Generic parameters can be used as types whenever they are in scope, subject to the restrictions described above.
Equivalence on generic class and value type instantiations is by structure. That is, two generic type instantiations are equivalent if and only if they are instantiations of the same generic type definition and their generic arguments are equivalent. This applies to static type signatures and to run-time type representations (type handles).
Rationale: orthogonality, also compare arrays.
A consequence of orthogonality with the existing CLR is that objects of generic type instantiations carry sufficient information to recover the actual arguments at run-time (the exact type). This manifests itself through casting and instance-of testing, as well as in reflection capabilities of course (Object.GetType).
The CLR rules for subtyping are extended as follows. Suppose that generic class or interface C has the header (constraints are optional)
C<tyvar-1,
..., tyvar-n> :
class-type, interface-type-1, ..., interface-type-m
where constraints
Then C<type-1,...,type-n> is a subtype of
class-type[substitute type-1 for tyvar-1,...,type-n for tyvar-n];
interface-type-j[substitute type-1 for tyvar-1,...,type-n for tyvar-n] for each j.
A consequence is that user-defined generic type definitions are not covariant in their type parameters, in contrast to the built-in array types and the generic types of the Eiffel programming language. For example, Queue<String> is not a subtype of Queue<Object>.
Rationale: this would lead to a type loophole without complex restrictions.
A member of an instantiation of a generic type definition C is accessible if and only if the member is accessible in C itself.
Instance members (fields and methods) of a generic type instantiation are referred to by member-ref, which consists of two parts:
It is possible for distinct members to have identical types when instantiated, but which can be distinguished by member-ref. For example:
class C<S,T> { String f; S f; void m(S x) {...} void m(T x) {...} void m(String x) {...} }
The generic class instantiation C<String,String> now has three methods called m, all with the same type, and two fields called f with the same type. They are easily distinguished through the member-ref encoding described above:
String C<String,String>::f S C<String,String>::f void C<String,String>::m(S) void C<String,String>::m(T) void C<String,String>::m(String)
How a source language might resolve this kind of overloading is another matter, of course.
Rationale:
For interop purposes it might be useful to define one method with Object argument type and another at type parameter T.
To outlaw such ambiguous classes could involve a relatively expensive check in the class loader.
There are two questions to answer here.
The rules that determine the answers are a
straightforward generalization of the existing rules, which are based around
the method signature: the name and types of arguments and results.
However, we must now take into account the instantiations of the
superclass and implemented interfaces. This is illustrated in the following C#
example:
class C<S,T> { public virtual T m1() { ... } public virtual S m2(T x) { ... } } class D<R> : C<int,R[]> { override public R[] m1() { ... } // inherits int m2(R[]) } class E<X> : D< List<X> > { // inherits List<X>[] m1() override public int m2(List<X>[] x) { ... } }
A single method body can serve as the implementation of multiple interfaces, just as in the existing runtime:
interface I<T> { void m(T x); } interface J { void m(int x); } class C : I<int>, J { void m(int x) { ... } }
MethodImpls can be used to provide distinct implementations. In C#:
class C : I<int>, J { void I<int>.m(int x) { ... } void J.m(int x) { ... } }
A class must not (directly or indirectly through interface inheritance) implement the same interface at more than one instantiation. For example, the class definitions below are illegal:
interface I<T> { void m(T x); void n(); } class C : I<int>, I<string> class D<T> : I<T>, I<double>
Rationale:
A generic method is a method for which formal generic parameters are declared. As with generic type definitions, each generic parameter has a name, and optionally constraints that must be interface or class types. See Section 2.14 for some examples.
The generic parameters are in scope in the types of the arguments and result (despite the appearance of the generic parameters to the right of the result type) and in the body of the method.
Generic instance (virtual and non-virtual) methods can occur inside generic type definitions, in which case the generic parameters of both the class and the method are in scope in the method.
public struct Pair<A, B> { A fst; B snd; Pair(A a, B b) { this.fst = a; this.snd = b; } public A GetFst() { return fst; } public B GetSnd() { return snd; } }
public class Stack<T> { T[] items; int nitems; const int initialsize = 20; public Stack() { nitems = 0; items = new T[initialsize]; } void Push(T item) { if (items.Length == nitems) { T[] temp = items; items = new T[nitems*2]; Array.Copy(temp, items, nitems); } items[nitems++] = item; } T Pop() { if (nitems == 0) throw new EmptyStack(); else return items[--nitems]; } bool IsEmpty() { return nitems==0; } }
public interface IEnumerator<T> { bool MoveNext(); T GetCurrent(); void Reset(); } public interface Ienumerable<T> { Ienumerator<T> GetEnumerator(); } public interface Icloneable<T> where T: Object // notice constraint { T Clone(); } public interface Icomparable<T> { int Compare(T x, T y); }
public class ArrayEnumerator<T> : Ienumerator<T> {...} public class Vowels : Ienumerator<String> {...} public class Primes : Ienumerator<int> {...} public abstract class PrintableList<T : Iprintable> : List<T>, Iprintable {...} // Generic parameters in constraints (aka "F-bounded" polymorphism) // Also notice recursive reference to class in interface public abstract class CloneableArrayList<T : Icloneable<T>> : ArrayList<T>, Icloneable<CloneableArrayList<T>> {...}
public class ArrayUtils { static void Reverse<T>(T[] arr, int index, int length) { int i = index; int j = index + length - 1; T temp; while (i < j) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; i++; j--; } } static T[] Slice<T>(T[] arr, int index, int length) { T[] copy = new T[length]; int j; for (j = 0; j < length; j++) copy[j] = arr[index+j]; return copy; } static void Sort<T>(T[] arr, Icomparer<T> comparer) {...} } // Generic instance method inside a generic class definition class FastArray<T> { ...methods from earlier... void PairWith<U>(FastArray<U> that) { int n = this.Length; FastArray<Pair<T,U>> result = new FastArray<Pair<T,U>>(n); for (int j = 0; j < n; j++) result[j] = new Pair<T,U>(this[j], that[j]); return result; } void PairWith<U>(U that) { int n = this.Length; FastArray<Pair<T,U>> result = new FastArray<Pair<T,U>>(n); for (int j = 0; j < n; j++) result[j] = new Pair<T,U>(this[j], that); return result; } } // Example of PairWith in action, assuming arr1 : FastArray<int> FastArray<Pair<int,String>> arr2 = arr1.PairWith<String>("foo");


The kernel of this 'Rcpp' based package is an efficient implementation of the generalized gradient projection method for spline function based constrained maximum likelihood estimator for interval censored survival data (Wu, Yuan; Zhang, Ying. Partially monotone tensor spline estimation of the joint distribution function with bivariate current status data. Ann. Statist. 40, 2012, 1609-1636 <doi:10.1214/12-AOS1016>). The key function computes the density function of the joint distribution of event time and the marker and returns the receiver operating characteristic (ROC) curve for the interval censored survival data as well as area under the curve (AUC).
| Version: | 0.1.1 |
| Imports: | Rcpp (≥ 0.12.4), pracma |
| LinkingTo: | Rcpp, RcppEigen |
| Suggests: | knitr, copula |
| Published: | 2018-05-02 |
| Author: | Jiaxing Lin, Yuan Wu, Xiaofei Wang, Kouros Owzar. |
| Maintainer: | Jiaxing Lin <jiaxing.lin at duke.edu> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://bitbucket.org/impactp01/intcensroc |
| NeedsCompilation: | yes |
| Materials: | NEWS |
| CRAN checks: | intcensROC results |
| Reference manual: | intcensROC.pdf |
| Vignettes: |
intcensROC |
| Package source: | intcensROC_0.1.1.tar.gz |
| Windows binaries: | r-devel: intcensROC_0.1.1.zip, r-release: intcensROC_0.1.1.zip, r-oldrel: intcensROC_0.1.1.zip |
| OS X binaries: | r-release: intcensROC_0.1.1.tgz, r-oldrel: intcensROC_0.1.1.tgz |
| Old sources: | intcensROC archive |
Please use the canonical form https://CRAN.R-project.org/package=intcensROC to link to this page.


Uses of Class
org.apache.cayenne.map.event.EntityEvent
| Package | Description |
|---|---|
| org.apache.cayenne.map |
Contains O/R mapping classes that store relational database
metadata information and map it to Java classes.
|
| org.apache.cayenne.map.event |
-
Uses of EntityEvent in org.apache.cayenne.map
Methods in org.apache.cayenne.map with parameters of type EntityEvent Modifier and Type Method Description void
DataMap. dbEntityAdded(EntityEvent e)
New entity has been created/added.void
DbEntity. dbEntityAdded(EntityEvent e)
New entity has been created/added.void
DataMap. dbEntityChanged(EntityEvent e)
DbEntity property changed.void
DbEntity. dbEntityChanged(EntityEvent e)
DbEntity property changed event.void
DataMap. dbEntityRemoved(EntityEvent e)
Entity has been removed.void
DbEntity. dbEntityRemoved(EntityEvent e)
Entity has been removed.void
DataMap. objEntityAdded(EntityEvent e)
New entity has been created/added.void
ObjEntity. objEntityAdded(EntityEvent e)
New entity has been created/added.void
DataMap. objEntityChanged(EntityEvent e)
ObjEntity property changed.void
ObjEntity. objEntityChanged(EntityEvent e)
ObjEntity property changed.void
DataMap. objEntityRemoved(EntityEvent e)
Entity has been removed.void
ObjEntity. objEntityRemoved(EntityEvent e)
Entity has been removed. -
Uses of EntityEvent in org.apache.cayenne.map.event
Subclasses of EntityEvent in org.apache.cayenne.map.event Modifier and Type Class Description class
AttributeEvent
Represents events resulted from Attribute changes in CayenneModeler.class
RelationshipEvent
Represents events resulted from Relationship changes in CayenneModeler.Methods in org.apache.cayenne.map.event with parameters of type EntityEvent Modifier and Type Method Description void
DbEntityListener. dbEntityAdded(EntityEvent e)
New entity has been created/added.void
DbEntityListener. dbEntityChanged(EntityEvent e)
Entity property changed.void
DbEntityListener. dbEntityRemoved(EntityEvent e)
Entity has been removed.void
ObjEntityListener. objEntityAdded(EntityEvent e)
New entity has been created/added.void
ObjEntityListener. objEntityChanged(EntityEvent e)
Entity property changed.void
ObjEntityListener. objEntityRemoved(EntityEvent e)
Entity has been removed.


Some Crowd servers may be slow, or rate limit client requests. In such cases enabling caching may improve performance
of Jenkins with the risk of delayed propagation of user changes from Crowd and increased memory usage on the controller node.
Note: The default configuration is to leave the cache turned off.


Refute 2016-1
Jasmin C. Blanchette1, Tjark Weber2
1Technische Universität München, Germany
2Uppsala Universitet, Sweden
Architecture
Refute [Web08] is an open source counterexample
generator for Isabelle/HOL [NPW13] based on a
SAT solver, and Nitpick's [BN10] precursor.
Strategies
Refute employs a SAT solver to find a finite model of the negated conjecture.
The translation from HOL to propositional logic is parameterized by the
cardinalities of the atomic types occurring in the conjecture. Refute enumerates
the possible cardinalities for each atomic type. If a formula has a finite
counterexample, the tool eventually finds it, unless it runs out of resources.
Implementation
Refute, like most of Isabelle/HOL, is written in Standard ML. Unlike Isabelle
itself, which adheres to the LCF small-kernel discipline, Refute does not
certify its results and must be trusted.
Refute is available as part of Isabelle/HOL for all major platforms under a
BSD-style license from
http://www.cl.cam.ac.uk/research/hvg/Isabelle
Expected Competition Performance
We expect Refute to beat Satallax but also to be beaten by Nitpick.
References
- BN10
- Blanchette J. C., Nipkow T. (2010),
Nitpick: A Counterexample Generator for Higher-Order Logic Based on a Relational Model Finder,
ITP 2010, LNCS 6172, pp. 131–146, Springer.
- NPW13
- Nipkow T., Paulson L. C., Wenzel M. (2013),
Isabelle/HOL: A Proof Assistant for Higher-Order Logic,
http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle/doc/tutorial.pdf.
- Web08
- Weber T. (2008),
SAT-based Finite Model Generation for Higher-Order Logic, Ph.D. thesis.


It is possible to embed saved-states into an executable. Together with static linking, this gives an all-in-one executable, an executable that does not depend on external SICStus files.
In the simplest case, creating an all-in-one executable main.exe from a saved state main.sav can be done with a command like
% spld --output=main.exe --static main.sav
This will automatically embed the saved state, any foreign resources needed by the saved state as well the SICStus run-time and its run-time saved state.
The keys to this feature are:
If the application needs foreign resources (predicates
written in C code), as used for example by library(system)
and
library(clpfd)
, these foreign resources can be linked
statically with the application as well.
The remaining component is the Prolog code itself; see the next item.
An application needs two saved-states:
sprt.sav
).
This is added automatically when spld is invoked with the --static (or -S) option unless the spld-option --no-embed-rt-sav is specified. It can also be added explicitly with the option --embed-rt-sav.
This saved-state is typically created by loading all
application code using compile/1
and then creating the
saved-state with save_program/2
.
Data resources are added by specifying their internal name and the
path to a file as part of the comma separated list of resources passed with
the spld option --resources. Each data resource is
specified as file=name where file is the path
to the
file containing the data (it must exist during the call to spld)
and name is the name used to access the content of file
during run-time. A typical choice of name would be the base name,
i.e. without directories, of file, preceded by a slash
(/
).
name should begin with a slash (/
) and
look like an ordinary lowercase file path made up of `/'-separated,
non-empty,
names consisting of `a' to `z', underscore (`_', period
(`.'), and digits.
Typically, you would use spld --main=restore
, which will
automatically restore the first `.sav' argument. To manually
restore an embedded saved-state you should use the syntax
URL:x-sicstus-resource:
name, e.g.
SP_restore("URL:x-sicstus-resource:/main.sav")
.
An example will make this clearer. Suppose we create a run-time system that consists of a single file main.pl that looks like:
% main.pl:- use_module(library(system)). :- use_module(library(clpfd)). % This will be called when the application starts: user:runtime_entry(start) :- %% You may consider putting some other code here... write('hello world'),nl, write('Getting date:'),nl, datime(Date), % from system write(Date),nl, ( all_different([3,9]) -> % from clpfd write('3 != 9'),nl ; otherwise -> write('3 = 9!?'),nl ).
Then create the saved-state main.sav, which will contain
the compiled code of main.pl as well as the Prolog code of
library(system)
and library(clpfd)
and other Prolog
libraries needed by library(clpfd)
.
% sicstus -i -f SICStus 4.0.2 ... Licensed to SICS | ?- compile(main). % compiling .../main.pl... % ... loading several library modules | ?- save_program('main.sav'). % .../main.sav created in 201 msec | ?- halt.
Finally, tell spld to build an executable statically linked
with the SICStus run-time and the foreign resources needed by
library(system)
and library(clpfd)
. Also, embed the Prolog
run-time saved-state and the application specific
saved-state just created. Note that the `random' foreign
resource is needed since it is used by library(clpfd)
.
As noted above, it is possible to build the all-in-one executable with the command line
% spld --output=main.exe --static main.sav
but for completeness the example below uses all options as if no options were added automatically.
The example is using Cygwin bash (http://www.cygwin.com) under Windows but would look much the same on other platforms. The command should be given on a single line; it is broken up here for better layout.
% spld --output=main.exe --static --embed-rt-sav --main=restore --resources=main.sav=/main.sav,clpfd,system,random
The arguments are as follows:
system
and clpfd
in this case).
user:runtime_entry(start)
. This is not strictly needed in the above
example since it is the default if any file with extension `.sav'
or a data resource with a name where the extension is `.sav' is
specified.
main.sav=/main.sav
"URL:x-sicstus-resource:/main.sav"
.
Alternatively, spld can create a default data resource
specification when passed a `.sav' file argument and the option
--embed-sav-file (which is the default with
--static).
clpfd
system
random
library(system)
,
library(clpfd)
and library(random)
.
Since --static was specified the static
versions of these foreign resources will be used.
Alternatively, spld can extract the information about the required foreign resources from the saved-state (main.sav). This feature is enabled by adding the option --resources-from-sav (which is the default with --static). Using --resources-from-sav instead of an explicit list of foreign resources is preferred since it is hard to know what foreign resources are used by the SICStus libraries.
Since both --embed-sav-file and --resources-from-sav are the default when --static is used the example can be built simply by doing
% spld --output=main.exe --static main.sav
Finally, we may run this executable on any machine, even if SICStus is not installed:
bash-2.04$ ./main.exe hello world Getting date: datime(2006,4,21,1,4,55) 3 != 9 bash-2.04$


Signed in as {{ username }}.
Sign out?
Main Page
Sign up for Events
Forum
Name: {{ user_name }}
Username: {{ username }}
Number of Posts: {{ post_count }}
Post
{% for post in posts %}
{{ post[0] }} says...
{{ post[1] }}
{{ post[2] }}
{% endfor %}


Toggle navigation
Spotify Artist Top Songs
About
1. Enter your favorite artist
go
2. Displaying Spotify data for:
3. Click a song to view its target market


JS9 Demo: a supermenu to control multiple displays
A supermenu (a JS9 Menubar whose id starts with SUPERMENU_, and
with a data-displays attribute) can control multiple JS9
displays simultaneously, so you can change colormaps, scales, etc. on
all displays. Or you can click on an individual display to make it
the selected display for the supermenu. (Click that display
again to unselect). You can also select a display from a supermenu's
File menu, which contains a list of selectable displays.
Thus, a supermenu can control several displays collectively or each
one individually.
In this demo, we have loaded Chandra (red), Galex (green), and
Spitzer (blue) images of colliding galaxies NGC 2207 and IC 2163 into
a single display:
- With a single display, the supermenu behaves like a normal menu
- Choose "File:separate:separate these images" to make three separate displays
- Use the Scale menu to change the scale of all three images to "histeq" and back to "log"
- Choose "WCS:wcs reproject:chandra.fits" to reproject the Spiter and Galex images using the Chandra WCS (reproject does not act on itself).
- Change the contrast/bias individually on any of the images (i.e., mouse manipulation is still tied to the individual images)
- You also can move the two Spitzer and Galex displays around in the page (i.e., they are lightweight windows)
- Click the chandra.fits (red) image to select it as the supermenu's target image (notice it gets a green highlighted border)
- Choose "File:separate:gather all images here" to move the Spitzer and Galex images back to the original display
- Choose "View: Blending", turn on Image Blending to view the blended images as one
- Again choose "File:separate:separate these images" to make three displays, so you can adjust contrast/bias individually
- Choose "File:separate:gather all images here" to move the Spitzer and Galex images back and display the blended images (since blending is still turned on)
JS9 Demos:
web page configuration:
multiple displays:
plugins:
colors:
data analysis:
FITS support:
not often needed:


{% extends 'fundraising/index.html' %} {% load fundraising_extras humanize static %} {% block content %} {% if messages %} {% for message in messages %}
Django Fellowship is a project where paid contractors are engaged to manage some of the administrative and community management tasks of the Django project to support rapid development of Django itself.
The first three months of the Django Fellowship program were very successful. In this short time, two Django Fellows, one full-time and one part-time, worked on around 240 pull requests (including reviewing some of the major features that are in Django 1.8), triaged at least 90 different tickets, and made around 200 commits in total! You can read the retrospective on the things that have been accomplished on our blog.
The program was renewed in March 2015 after the initial fundraising efforts to renew the program succeeded.
The program has already had a major positive impact on how Django is developed and maintained. Release blocking and severe bugs are not postponed indefinitely. Django Fellows are a resource to help review patches and contributions from the community, and the community loves that:
{% if testimonial %}{{ testimonial.body|linebreaks }} {{ testimonial.author }}{% endif %}
If you use Django on a daily basis and care about the development of Django itself, you should donate today (may be tax deductible). Only with your support can we make sure that the Web framework you base your work on can grow to be even better in the coming years.
The weekly cost of the program is about US $2,800.00. Your donations sustain the program.
Learn more about the Django Fellowship program.
The DSF is pleased to be a participant in the Benevity Workplace Giving Program. When your employer becomes a member of the Benevity community, you are able to make donations to the DSF via payroll deduction. Many employers offer a matching contribution as well, increasing the amount that the DSF receives from your donation.
Benevity is available to employers in any country, and works with your company’s payroll department for ease of use from set up to payments.
Check with your employer to see if they participate in Benevity, or visit the Benevity site at www.benevity.com to find out more if your employer is not yet part of the Benevity program.
We're incredibly grateful to everyone who donated to make this happen. We couldn't possibly do it without the continuous support from the community.
{% display_django_heros campaign %}Development of Django is supported by an independent foundation established as a 501(c)(3) non-profit. Like most open-source foundations, the goal of the Django Software Foundation is to promote, support, and advance the Django Web framework. If you're interested in how the Django Software Foundation supports the Django Web framework, we published a Summary of 2014.
Tim Graham - a member of the core team for several years. For the 12 months before the fellowship began, he was a major contributor, reviewing and merging pull requests. Tim was contracted as a full-time Fellow for the duration of the 3 month pilot and continued when the program was renewed in March 2015.


Facebook and Publishers: A fix for direct traffic from Facebook’s mobile app
Yesterday, Facebook announced a number of new tools for publishers, as part of their on-going relationship to encourage a high volume of quality content that will keep us scrolling through our newsfeeds.
At the bottom was a short mention:
We also recently fixed a bug that caused many third-party analytics tools to undercount the percentage of their organic traffic from Facebook. In the past, referrer data was missing from some of our outbound mobile clicks. This issue has been resolved for iOS, with a fix for Android coming soon. Publishers may see an increase in iOS mobile traffic from Facebook and a decrease in undefined sources or direct traffic.
ICYMI – this is a fix for direct traffic (sometimes called “dark social”) for traffic coming through the mobile app that sometimes dropped the referral information.
Here’s a little background:
Anyone who has looked at analytics, has seen “direct” as a traffic source. There tends to be a fair amount of confusion around this section, as it encompasses anything that analytics can’t track.
Traditionally, publishers assumed direct traffic was people bookmarking their home page or typing in the address directly in the search bar. However, since Parse.ly looks at analytics by a post-by-post basis, we can’t make that assumption, as most people are not typing in new article post URLs “directly” into their browser.
Sources for this traffic include:
- Email/IMs
- Copying and pasting a link
- Switching from a https:// site to an http:// site
- Chat apps (Whats App, etc.)
In 2012, Alexis Madrigal wrote a story about these sources, terming them “dark social”. (This post is worth re-reading for some fun facts like “Only about four percent of total traffic is on mobile at all.”) In summary, he supposed that since these were links that were being shared from person-to-person, this kind of traffic should still be thought of as social sharing.
Parse.ly’s CTO, Andrew Montalenti, explained some other areas that “dark” traffic can come from – he points out that it’s not all social; some traffic might also be explained by search and sites that block their referral information from being passed through or programs used by people protecting their browsing (especially in the wake of Snowden/NSA revelations).
Though many of those sources will probably continue to be “dark”, a lot of us in the analytics community realized a while ago that Facebook was sending some of this direct traffic. The Guardian’s Ophan architect, Graham Tackley, showed off charts at ONA this year on how The Guardian saw its direct traffic spike in association with Facebook spikes.
We saw a similar pattern, and called up Facebook a few months ago. As the massive social network makes a concerted effort to work with publishers, they were concerned at the differences we saw compared to their own data, and we shared some of our aggregate data with them as they worked to fix the referral issue.
What to expect from the fix:
The announcement above acknowledged the first fix, and we’ll continue to monitor the impact that this is making in our system.
What does this mean for your traffic? We checked the amount of traffic that currently comes into posts as direct (aka “dark social”) but is actually Facebook by looking at the user agents and found in one sample that 11% of total traffic coming was from Facebook. (And yes – that means that almost 50% of all external traffic referrers in this sample came from Facebook, wow.)
Our analysis also checked out how much of that dark traffic came in from Android vs. iOS. We’ll be keeping track of this for the next few weeks, and we expect to see those numbers go down as the app fixes roll out and people update their apps.
We know that people have a lot of questions about this, and we’re happy to provide additional information or answer questions about it – let us know in a comment, or shoot us a note.
Parse.ly, December 11, 2014


--- layout: example title: "Equal Column Classes" permalink: /examples/fluid/equal-columns/ ---
Equal width column class can be generated.


--- layout: page title: "Web Linking" description: "This document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field." ---
| Document Name: | RFC 5988 |
|---|---|
| Document URI: |
urn:ietf:rfc:5988
|
| Online Version: |
http://tools.ietf.org/html/rfc5988
|
| Organization: | Internet Engineering Task Force (IETF) |
| Series: | Request for Comments (RFC) |
| Abstract: | This document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field. |
Link
Return to ( Series | Organization | all Specifications )


AWS Fundamentals Specialization
Coursera, Amazone Web Service
Gained a more vivid understanding of core AWS services, key AWS security concepts, strategies for migrating from on-premises to AWS, and basics of building serverless applications with AWS.


-
Our Vision
We want to give hope to children with ADHD through relieving their stress and pain, including their families’. We aim to make South Korea the number one medical healthcare-providing country.
-
Disorders
Attention Deficit Hyperactivity Disorder (ADHD) is a neurodevelopmental disorder which has three core symptoms: inattention, hyperactivity and impulsivity. According to adhd-institute.com there are between 5.29% - 7.1% of children and adolescents suffer from ADHD and there is a higher prevalence in males than females.
-
Our Service
Our company develops varied neurodevelopmental disease models, performs drug efficacy tests through drug screening and conducts two-way consultation on experiments and drugs.
-
Specific research focusing on ADHD
Our company has received various research assignments on neurodevelopmental disorders from national grants, helping us hone our skills in this particular field of research. Recently we got S grade from the Research Foundation in South Korea.We develop effective and personalized drug for patients aiming to reduce unwanted drug side effects through pharmacologically-based research procedures.


| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Appendix E. Release Notes | Next |
Release date: 1999-06-09
This release marks a major step in the development team's mastery of the source code we inherited from Berkeley. You will see we are now easily adding major features, thanks to the increasing size and experience of our world-wide development team.
Here is a brief summary of the more notable changes:
This removes our old table-level locking, and replaces it with a locking system that is superior to most commercial database systems. In a traditional system, each row that is modified is locked until committed, preventing reads by other users. MVCC uses the natural multiversion nature of PostgreSQL to allow readers to continue reading consistent data during writer activity. Writers continue to use the compact pg_log transaction system. This is all performed without having to allocate a lock for every row like traditional database systems. So, basically, we no longer are restricted by simple table-level locking; we have something better than row-level locking.
pg_dump takes advantage of the new MVCC features to give a consistent database dump/backup while the database stays online and available for queries.
We now have a true numeric data type, with user-specified precision.
Temporary tables are guaranteed to have unique names within a database session, and are destroyed on session exit.
We now have CASE, INTERSECT, and EXCEPT statement support. We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL, SELECT ... FOR UPDATE, and an improved LOCK TABLE command.
We continue to speed up PostgreSQL, thanks to the variety of talents within our team. We have sped up memory allocation, optimization, table joins, and row transfer routines.
We continue to expand our port list, this time including Windows NT/ix86 and NetBSD/arm32.
Most interfaces have new versions, and existing functionality has been improved.
New and updated material is present throughout the documentation. New FAQs have been contributed for SGI and AIX platforms. The Tutorial has introductory information on SQL from Stefan Simkovics. For the User's Guide, there are reference pages covering the postmaster and more utility programs, and a new appendix contains details on date/time behavior. The Administrator's Guide has a new chapter on troubleshooting from Tom Lane. And the Programmer's Guide has a description of query processing, also from Stefan, and details on obtaining the PostgreSQL source tree via anonymous CVS and CVSup.
A dump/restore using pg_dump is required for those wishing to migrate data from any previous release of PostgreSQL. pg_upgrade can not be used to upgrade to this release because the on-disk structure of the tables has changed compared to previous releases.
The new Multiversion Concurrency Control (MVCC) features can give somewhat different behaviors in multiuser environments. Read and understand the following section to ensure that your existing applications will give you the behavior you need.
Because readers in 6.5 don't lock data, regardless of transaction isolation level, data read by one transaction can be overwritten by another. In other words, if a row is returned by SELECT it doesn't mean that this row really exists at the time it is returned (i.e. sometime after the statement or transaction began) nor that the row is protected from being deleted or updated by concurrent transactions before the current transaction does a commit or rollback.
To ensure the actual existence of a row and protect it against concurrent updates one must use SELECT FOR UPDATE or an appropriate LOCK TABLE statement. This should be taken into account when porting applications from previous releases of PostgreSQL and other environments.
Keep the above in mind if you are using contrib/refint.* triggers for referential integrity. Additional techniques are required now. One way is to use LOCK parent_table IN SHARE ROW EXCLUSIVE MODE command if a transaction is going to update/delete a primary key and use LOCK parent_table IN SHARE MODE command if a transaction is going to update/insert a foreign key.
Note: Note that if you run a transaction in SERIALIZABLE mode then you must execute the LOCK commands above before execution of any DML statement (SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO) in the transaction.
These inconveniences will disappear in the future when the ability to read dirty (uncommitted) data (regardless of isolation level) and true referential integrity will be implemented.
Bug Fixes --------- Fix text<->float8 and text<->float4 conversion functions(Thomas) Fix for creating tables with mixed-case constraints(Billy) Change exp()/pow() behavior to generate error on underflow/overflow(Jan) Fix bug in pg_dump -z Memory overrun cleanups(Tatsuo) Fix for lo_import crash(Tatsuo) Adjust handling of data type names to suppress double quotes(Thomas) Use type coercion for matching columns and DEFAULT(Thomas) Fix deadlock so it only checks once after one second of sleep(Bruce) Fixes for aggregates and PL/pgsql(Hiroshi) Fix for subquery crash(Vadim) Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo) Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo) Fix for pg_dump -d or -D and quote special characters in INSERT Repair serious problems with dynahash(Tom) Fix INET/CIDR portability problems Fix problem with selectivity error in ALTER TABLE ADD COLUMN(Bruce) Fix executor so mergejoin of different column types works(Tom) Fix for Alpha OR selectivity bug Fix OR index selectivity problem(Bruce) Fix so \d shows proper length for char()/varchar()(Ryan) Fix tutorial code(Clark) Improve destroyuser checking(Oliver) Fix for Kerberos(Rodney McDuff) Fix for dropping database while dirty buffers(Bruce) Fix so sequence nextval() can be case-sensitive(Bruce) Fix !!= operator Drop buffers before destroying database files(Bruce) Fix case where executor evaluates functions twice(Tatsuo) Allow sequence nextval actions to be case-sensitive(Bruce) Fix optimizer indexing not working for negative numbers(Bruce) Fix for memory leak in executor with fjIsNull Fix for aggregate memory leaks(Erik Riedel) Allow user name containing a dash to grant privileges Cleanup of NULL in inet types Clean up system table bugs(Tom) Fix problems of PAGER and \? command(Masaaki Sakaida) Reduce default multisegment file size limit to 1GB(Peter) Fix for dumping of CREATE OPERATOR(Tom) Fix for backward scanning of cursors(Hiroshi Inoue) Fix for COPY FROM STDIN when using \i(Tom) Fix for subselect is compared inside an expression(Jan) Fix handling of error reporting while returning rows(Tom) Fix problems with reference to array types(Tom,Jan) Prevent UPDATE SET oid(Jan) Fix pg_dump so -t option can handle case-sensitive tablenames Fixes for GROUP BY in special cases(Tom, Jan) Fix for memory leak in failed queries(Tom) DEFAULT now supports mixed-case identifiers(Tom) Fix for multisegment uses of DROP/RENAME table, indexes(Ole Gjerde) Disable use of pg_dump with both -o and -d options(Bruce) Allow pg_dump to properly dump group privileges(Bruce) Fix GROUP BY in INSERT INTO table SELECT * FROM table2(Jan) Fix for computations in views(Jan) Fix for aggregates on array indexes(Tom) Fix for DEFAULT handles single quotes in value requiring too many quotes Fix security problem with non-super users importing/exporting large objects(Tom) Rollback of transaction that creates table cleaned up properly(Tom) Fix to allow long table and column names to generate proper serial names(Tom) Enhancements ------------ Add "vacuumdb" utility Speed up libpq by allocating memory better(Tom) EXPLAIN all indexes used(Tom) Implement CASE, COALESCE, NULLIF expression(Thomas) New pg_dump table output format(Constantin) Add string min()/max() functions(Thomas) Extend new type coercion techniques to aggregates(Thomas) New moddatetime contrib(Terry) Update to pgaccess 0.96(Constantin) Add routines for single-byte "char" type(Thomas) Improved substr() function(Thomas) Improved multibyte handling(Tatsuo) Multiversion concurrency control/MVCC(Vadim) New Serialized mode(Vadim) Fix for tables over 2gigs(Peter) New SET TRANSACTION ISOLATION LEVEL(Vadim) New LOCK TABLE IN ... MODE(Vadim) Update ODBC driver(Byron) New NUMERIC data type(Jan) New SELECT FOR UPDATE(Vadim) Handle "NaN" and "Infinity" for input values(Jan) Improved date/year handling(Thomas) Improved handling of backend connections(Magnus) New options ELOG_TIMESTAMPS and USE_SYSLOG options for log files(Massimo) New TCL_ARRAYS option(Massimo) New INTERSECT and EXCEPT(Stefan) New pg_index.indisprimary for primary key tracking(D'Arcy) New pg_dump option to allow dropping of tables before creation(Brook) Speedup of row output routines(Tom) New READ COMMITTED isolation level(Vadim) New TEMP tables/indexes(Bruce) Prevent sorting if result is already sorted(Jan) New memory allocation optimization(Jan) Allow psql to do \p\g(Bruce) Allow multiple rule actions(Jan) Added LIMIT/OFFSET functionality(Jan) Improve optimizer when joining a large number of tables(Bruce) New intro to SQL from S. Simkovics' Master's Thesis (Stefan, Thomas) New intro to backend processing from S. Simkovics' Master's Thesis (Stefan) Improved int8 support(Ryan Bradetich, Thomas, Tom) New routines to convert between int8 and text/varchar types(Thomas) New bushy plans, where meta-tables are joined(Bruce) Enable right-hand queries by default(Bruce) Allow reliable maximum number of backends to be set at configure time (--with-maxbackends and postmaster switch (-N backends))(Tom) GEQO default now 10 tables because of optimizer speedups(Tom) Allow NULL=Var for MS-SQL portability(Michael, Bruce) Modify contrib check_primary_key() so either "automatic" or "dependent"(Anand) Allow psql \d on a view show query(Ryan) Speedup for LIKE(Bruce) Ecpg fixes/features, see src/interfaces/ecpg/ChangeLog file(Michael) JDBC fixes/features, see src/interfaces/jdbc/CHANGELOG(Peter) Make % operator have precedence like /(Bruce) Add new postgres -O option to allow system table structure changes(Bruce) Update contrib/pginterface/findoidjoins script(Tom) Major speedup in vacuum of deleted rows with indexes(Vadim) Allow non-SQL functions to run different versions based on arguments(Tom) Add -E option that shows actual queries sent by \dt and friends(Masaaki Sakaida) Add version number in start-up banners for psql(Masaaki Sakaida) New contrib/vacuumlo removes large objects not referenced(Peter) New initialization for table sizes so non-vacuumed tables perform better(Tom) Improve error messages when a connection is rejected(Tom) Support for arrays of char() and varchar() fields(Massimo) Overhaul of hash code to increase reliability and performance(Tom) Update to PyGreSQL 2.4(D'Arcy) Changed debug options so -d4 and -d5 produce different node displays(Jan) New pg_options: pretty_plan, pretty_parse, pretty_rewritten(Jan) Better optimization statistics for system table access(Tom) Better handling of non-default block sizes(Massimo) Improve GEQO optimizer memory consumption(Tom) UNION now supports ORDER BY of columns not in target list(Jan) Major libpq++ improvements(Vince Vielhaber) pg_dump now uses -z(ACL's) as default(Bruce) backend cache, memory speedups(Tom) have pg_dump do everything in one snapshot transaction(Vadim) fix for large object memory leakage, fix for pg_dumping(Tom) INET type now respects netmask for comparisons Make VACUUM ANALYZE only use a readlock(Vadim) Allow VIEWs on UNIONS(Jan) pg_dump now can generate consistent snapshots on active databases(Vadim) Source Tree Changes ------------------- Improve port matching(Tom) Portability fixes for SunOS Add Windows NT backend port and enable dynamic loading(Magnus and Daniel Horak) New port to Cobalt Qube(Mips) running Linux(Tatsuo) Port to NetBSD/m68k(Mr. Mutsuki Nakajima) Port to NetBSD/sun3(Mr. Mutsuki Nakajima) Port to NetBSD/macppc(Toshimi Aoki) Fix for tcl/tk configuration(Vince) Removed CURRENT key word for rule queries(Jan) NT dynamic loading now works(Daniel Horak) Add ARM32 support(Andrew McMurry) Better support for HP-UX 11 and UnixWare Improve file handling to be more uniform, prevent file descriptor leak(Tom) New install commands for plpgsql(Jan)