From a2fd89f963a7374b29f7831e67b443c3d42c6e3c Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 1 Aug 2013 22:53:27 +0200 Subject: Added SFMT prng. --- SFMT/html/_s_f_m_t_8c.html | 607 ++++++++++++++++++++++ SFMT/html/_s_f_m_t_8h.html | 848 +++++++++++++++++++++++++++++++ SFMT/html/_s_f_m_t_8h_source.html | 261 ++++++++++ SFMT/html/annotated.html | 72 +++ SFMT/html/bc_s.png | Bin 0 -> 705 bytes SFMT/html/bdwn.png | Bin 0 -> 147 bytes SFMT/html/classes.html | 78 +++ SFMT/html/closed.png | Bin 0 -> 126 bytes SFMT/html/doxygen.css | 1012 +++++++++++++++++++++++++++++++++++++ SFMT/html/doxygen.png | Bin 0 -> 3942 bytes SFMT/html/files.html | 72 +++ SFMT/html/functions.html | 84 +++ SFMT/html/functions_vars.html | 84 +++ SFMT/html/globals.html | 213 ++++++++ SFMT/html/globals_defs.html | 84 +++ SFMT/html/globals_func.html | 185 +++++++ SFMT/html/globals_type.html | 81 +++ SFMT/html/globals_vars.html | 78 +++ SFMT/html/howto-compile.html | 493 ++++++++++++++++++ SFMT/html/index.html | 123 +++++ SFMT/html/jquery.js | 64 +++ SFMT/html/mainpage_8txt.html | 68 +++ SFMT/html/nav_f.png | Bin 0 -> 159 bytes SFMT/html/nav_h.png | Bin 0 -> 97 bytes SFMT/html/open.png | Bin 0 -> 118 bytes SFMT/html/struct_s_f_m_t___t.html | 123 +++++ SFMT/html/tab_a.png | Bin 0 -> 140 bytes SFMT/html/tab_b.png | Bin 0 -> 178 bytes SFMT/html/tab_h.png | Bin 0 -> 192 bytes SFMT/html/tab_s.png | Bin 0 -> 189 bytes SFMT/html/tabs.css | 59 +++ SFMT/html/union_w128___t.html | 117 +++++ 32 files changed, 4806 insertions(+) create mode 100644 SFMT/html/_s_f_m_t_8c.html create mode 100644 SFMT/html/_s_f_m_t_8h.html create mode 100644 SFMT/html/_s_f_m_t_8h_source.html create mode 100644 SFMT/html/annotated.html create mode 100644 SFMT/html/bc_s.png create mode 100644 SFMT/html/bdwn.png create mode 100644 SFMT/html/classes.html create mode 100644 SFMT/html/closed.png create mode 100644 SFMT/html/doxygen.css create mode 100644 SFMT/html/doxygen.png create mode 100644 SFMT/html/files.html create mode 100644 SFMT/html/functions.html create mode 100644 SFMT/html/functions_vars.html create mode 100644 SFMT/html/globals.html create mode 100644 SFMT/html/globals_defs.html create mode 100644 SFMT/html/globals_func.html create mode 100644 SFMT/html/globals_type.html create mode 100644 SFMT/html/globals_vars.html create mode 100644 SFMT/html/howto-compile.html create mode 100644 SFMT/html/index.html create mode 100644 SFMT/html/jquery.js create mode 100644 SFMT/html/mainpage_8txt.html create mode 100644 SFMT/html/nav_f.png create mode 100644 SFMT/html/nav_h.png create mode 100644 SFMT/html/open.png create mode 100644 SFMT/html/struct_s_f_m_t___t.html create mode 100644 SFMT/html/tab_a.png create mode 100644 SFMT/html/tab_b.png create mode 100644 SFMT/html/tab_h.png create mode 100644 SFMT/html/tab_s.png create mode 100644 SFMT/html/tabs.css create mode 100644 SFMT/html/union_w128___t.html (limited to 'SFMT/html') diff --git a/SFMT/html/_s_f_m_t_8c.html b/SFMT/html/_s_f_m_t_8c.html new file mode 100644 index 0000000..1e1dd68 --- /dev/null +++ b/SFMT/html/_s_f_m_t_8c.html @@ -0,0 +1,607 @@ + + + + + +SFMT: SFMT.c File Reference + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+ +
+
SFMT.c File Reference
+
+
+ +

SIMD oriented Fast Mersenne Twister(SFMT) +More...

+
#include <string.h>
+#include <assert.h>
+#include "SFMT.h"
+#include "SFMT-params.h"
+#include "SFMT-common.h"
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Defines

#define UNUSED_VARIABLE(x)   (void)(x)

+Functions

static int idxof (int i)
 This function simulate a 64-bit index of LITTLE ENDIAN in BIG ENDIAN machine.
static void gen_rand_array (sfmt_t *sfmt, w128_t *array, int size)
 This function fills the user-specified array with pseudorandom integers.
static uint32_t func1 (uint32_t x)
 This function represents a function used in the initialization by init_by_array.
static uint32_t func2 (uint32_t x)
 This function represents a function used in the initialization by init_by_array.
static void period_certification (sfmt_t *sfmt)
 This function certificate the period of 2^{MEXP}.
const char * sfmt_get_idstring (sfmt_t *sfmt)
 This function returns the identification string.
int sfmt_get_min_array_size32 (sfmt_t *sfmt)
 This function returns the minimum size of array used for fill_array32() function.
int sfmt_get_min_array_size64 (sfmt_t *sfmt)
 This function returns the minimum size of array used for fill_array64() function.
void sfmt_gen_rand_all (sfmt_t *sfmt)
 This function fills the internal state array with pseudorandom integers.
void sfmt_fill_array32 (sfmt_t *sfmt, uint32_t *array, int size)
 This function generates pseudorandom 32-bit integers in the specified array[] by one call.
void sfmt_fill_array64 (sfmt_t *sfmt, uint64_t *array, int size)
 This function generates pseudorandom 64-bit integers in the specified array[] by one call.
void sfmt_init_gen_rand (sfmt_t *sfmt, uint32_t seed)
 This function initializes the internal state array with a 32-bit integer seed.
void sfmt_init_by_array (sfmt_t *sfmt, uint32_t *init_key, int key_length)
 This function initializes the internal state array, with an array of 32-bit integers used as the seeds.

+Variables

static const w128_t sse2_param_mask
 parameters used by sse2.
+

Detailed Description

+

SIMD oriented Fast Mersenne Twister(SFMT)

+
Author:
Mutsuo Saito (Hiroshima University)
+
+Makoto Matsumoto (Hiroshima University)
+

Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.

+

The 3-clause BSD License is applied to this software, see LICENSE.txt

+

Define Documentation

+ +
+
+ + + + + + + + +
#define UNUSED_VARIABLE( x)   (void)(x)
+
+ +
+

Function Documentation

+ +
+
+ + + + + + + + +
static uint32_t func1 (uint32_t x) [inline, static]
+
+
+ +

This function represents a function used in the initialization by init_by_array.

+
Parameters:
+ + +
x32-bit integer
+
+
+
Returns:
32-bit integer
+ +

Referenced by sfmt_init_by_array().

+ +
+
+ +
+
+ + + + + + + + +
static uint32_t func2 (uint32_t x) [inline, static]
+
+
+ +

This function represents a function used in the initialization by init_by_array.

+
Parameters:
+ + +
x32-bit integer
+
+
+
Returns:
32-bit integer
+ +

Referenced by sfmt_init_by_array().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static void gen_rand_array (sfmt_tsfmt,
w128_tarray,
int size 
) [inline, static]
+
+
+ +

This function fills the user-specified array with pseudorandom integers.

+
Parameters:
+ + + + +
sfmtSFMT internal state
arrayan 128-bit array to be filled by pseudorandom numbers.
sizenumber of 128-bit pseudorandom numbers to be generated.
+
+
+ +

References SFMT_T::state.

+ +

Referenced by sfmt_fill_array32(), and sfmt_fill_array64().

+ +
+
+ +
+
+ + + + + + + + +
static int idxof (int i) [inline, static]
+
+
+ +

This function simulate a 64-bit index of LITTLE ENDIAN in BIG ENDIAN machine.

+ +

Referenced by period_certification(), sfmt_init_by_array(), and sfmt_init_gen_rand().

+ +
+
+ +
+
+ + + + + + + + +
static void period_certification (sfmt_tsfmt) [static]
+
+
+ +

This function certificate the period of 2^{MEXP}.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+ +

References idxof(), SFMT_T::state, and W128_T::u.

+ +

Referenced by sfmt_init_by_array(), and sfmt_init_gen_rand().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_fill_array32 (sfmt_tsfmt,
uint32_t * array,
int size 
)
+
+
+ +

This function generates pseudorandom 32-bit integers in the specified array[] by one call.

+

The number of pseudorandom integers is specified by the argument size, which must be at least 624 and a multiple of four. The generation by this function is much faster than the following gen_rand function.

+

For initialization, init_gen_rand or init_by_array must be called before the first call of this function. This function can not be used after calling gen_rand function, without initialization.

+
Parameters:
+ + + + +
sfmtSFMT internal state
arrayan array where pseudorandom 32-bit integers are filled by this function. The pointer to the array must be "aligned" (namely, must be a multiple of 16) in the SIMD version, since it refers to the address of a 128-bit integer. In the standard C version, the pointer is arbitrary.
sizethe number of 32-bit pseudorandom integers to be generated. size must be a multiple of 4, and greater than or equal to (MEXP / 128 + 1) * 4.
+
+
+
Note:
memalign or posix_memalign is available to get aligned memory. Mac OSX doesn't have these functions, but malloc of OSX returns the pointer to the aligned memory block.
+ +

References gen_rand_array(), and SFMT_T::idx.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_fill_array64 (sfmt_tsfmt,
uint64_t * array,
int size 
)
+
+
+ +

This function generates pseudorandom 64-bit integers in the specified array[] by one call.

+

The number of pseudorandom integers is specified by the argument size, which must be at least 312 and a multiple of two. The generation by this function is much faster than the following gen_rand function.

+
Parameters:
+ + + + +
sfmtSFMT internal state For initialization, init_gen_rand or init_by_array must be called before the first call of this function. This function can not be used after calling gen_rand function, without initialization.
arrayan array where pseudorandom 64-bit integers are filled by this function. The pointer to the array must be "aligned" (namely, must be a multiple of 16) in the SIMD version, since it refers to the address of a 128-bit integer. In the standard C version, the pointer is arbitrary.
sizethe number of 64-bit pseudorandom integers to be generated. size must be a multiple of 2, and greater than or equal to (MEXP / 128 + 1) * 2
+
+
+
Note:
memalign or posix_memalign is available to get aligned memory. Mac OSX doesn't have these functions, but malloc of OSX returns the pointer to the aligned memory block.
+ +

References gen_rand_array(), and SFMT_T::idx.

+ +
+
+ +
+
+ + + + + + + + +
void sfmt_gen_rand_all (sfmt_tsfmt)
+
+
+ +

This function fills the internal state array with pseudorandom integers.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+ +

References SFMT_T::state.

+ +

Referenced by sfmt_genrand_uint32(), and sfmt_genrand_uint64().

+ +
+
+ +
+
+ + + + + + + + +
const char* sfmt_get_idstring (sfmt_tsfmt)
+
+
+ +

This function returns the identification string.

+

The string shows the word size, the Mersenne exponent, and all parameters of this generator.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + +
int sfmt_get_min_array_size32 (sfmt_tsfmt)
+
+
+ +

This function returns the minimum size of array used for fill_array32() function.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
minimum size of array used for fill_array32() function.
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + +
int sfmt_get_min_array_size64 (sfmt_tsfmt)
+
+
+ +

This function returns the minimum size of array used for fill_array64() function.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
minimum size of array used for fill_array64() function.
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_init_by_array (sfmt_tsfmt,
uint32_t * init_key,
int key_length 
)
+
+
+ +

This function initializes the internal state array, with an array of 32-bit integers used as the seeds.

+
Parameters:
+ + + + +
sfmtSFMT internal state
init_keythe array of 32-bit integers, used as a seed.
key_lengththe length of init_key.
+
+
+ +

References func1(), func2(), SFMT_T::idx, idxof(), period_certification(), SFMT_T::state, and W128_T::u.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void sfmt_init_gen_rand (sfmt_tsfmt,
uint32_t seed 
)
+
+
+ +

This function initializes the internal state array with a 32-bit integer seed.

+
Parameters:
+ + + +
sfmtSFMT internal state
seeda 32-bit integer used as the seed.
+
+
+ +

References SFMT_T::idx, idxof(), period_certification(), SFMT_T::state, and W128_T::u.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const w128_t sse2_param_mask [static]
+
+
+Initial value:
 {{SFMT_MSK1, SFMT_MSK2,
+                                        SFMT_MSK3, SFMT_MSK4}}
+
+

parameters used by sse2.

+ +
+
+
+ + + + + + diff --git a/SFMT/html/_s_f_m_t_8h.html b/SFMT/html/_s_f_m_t_8h.html new file mode 100644 index 0000000..86e5740 --- /dev/null +++ b/SFMT/html/_s_f_m_t_8h.html @@ -0,0 +1,848 @@ + + + + + +SFMT: SFMT.h File Reference + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+ +
+
SFMT.h File Reference
+
+
+ +

SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator using C structure. +More...

+
#include <stdio.h>
+#include <assert.h>
+#include <inttypes.h>
+#include "SFMT-params.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

union  W128_T
 128-bit data structure More...
struct  SFMT_T
 SFMT internal state. More...

+Defines

#define PRIu64   "llu"
#define PRIx64   "llx"

+Typedefs

typedef union W128_T w128_t
 128-bit data type
typedef struct SFMT_T sfmt_t

+Functions

void sfmt_fill_array32 (sfmt_t *sfmt, uint32_t *array, int size)
 This function generates pseudorandom 32-bit integers in the specified array[] by one call.
void sfmt_fill_array64 (sfmt_t *sfmt, uint64_t *array, int size)
 This function generates pseudorandom 64-bit integers in the specified array[] by one call.
void sfmt_init_gen_rand (sfmt_t *sfmt, uint32_t seed)
 This function initializes the internal state array with a 32-bit integer seed.
void sfmt_init_by_array (sfmt_t *sfmt, uint32_t *init_key, int key_length)
 This function initializes the internal state array, with an array of 32-bit integers used as the seeds.
const char * sfmt_get_idstring (sfmt_t *sfmt)
 This function returns the identification string.
int sfmt_get_min_array_size32 (sfmt_t *sfmt)
 This function returns the minimum size of array used for fill_array32() function.
int sfmt_get_min_array_size64 (sfmt_t *sfmt)
 This function returns the minimum size of array used for fill_array64() function.
void sfmt_gen_rand_all (sfmt_t *sfmt)
 This function fills the internal state array with pseudorandom integers.
static uint32_t sfmt_genrand_uint32 (sfmt_t *sfmt)
 This function generates and returns 32-bit pseudorandom number.
static uint64_t sfmt_genrand_uint64 (sfmt_t *sfmt)
 This function generates and returns 64-bit pseudorandom number.
static double sfmt_to_real1 (uint32_t v)
 converts an unsigned 32-bit number to a double on [0,1]-real-interval.
static double sfmt_genrand_real1 (sfmt_t *sfmt)
 generates a random number on [0,1]-real-interval
static double sfmt_to_real2 (uint32_t v)
 converts an unsigned 32-bit integer to a double on [0,1)-real-interval.
static double sfmt_genrand_real2 (sfmt_t *sfmt)
 generates a random number on [0,1)-real-interval
static double sfmt_to_real3 (uint32_t v)
 converts an unsigned 32-bit integer to a double on (0,1)-real-interval.
static double sfmt_genrand_real3 (sfmt_t *sfmt)
 generates a random number on (0,1)-real-interval
static double sfmt_to_res53 (uint64_t v)
 converts an unsigned 32-bit integer to double on [0,1) with 53-bit resolution.
static double sfmt_genrand_res53 (sfmt_t *sfmt)
 generates a random number on [0,1) with 53-bit resolution
static double sfmt_to_res53_mix (uint32_t x, uint32_t y)
 generates a random number on [0,1) with 53-bit resolution from two 32 bit integers
static double sfmt_genrand_res53_mix (sfmt_t *sfmt)
 generates a random number on [0,1) with 53-bit resolution using two 32bit integers.
+

Detailed Description

+

SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator using C structure.

+
Author:
Mutsuo Saito (Hiroshima University)
+
+Makoto Matsumoto (The University of Tokyo)
+

Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.

+

The 3-clause BSD License is applied to this software, see LICENSE.txt

+
Note:
We assume that your system has inttypes.h. If your system doesn't have inttypes.h, you have to typedef uint32_t and uint64_t, and you have to define PRIu64 and PRIx64 in this file as follows:
 typedef unsigned int uint32_t
+ typedef unsigned long long uint64_t
+ #define PRIu64 "llu"
+ #define PRIx64 "llx"
+
uint32_t must be exactly 32-bit unsigned integer type (no more, no less), and uint64_t must be exactly 64-bit unsigned integer type. PRIu64 and PRIx64 are used for printf function to print 64-bit unsigned int and 64-bit unsigned int in hexadecimal format.
+

Define Documentation

+ +
+
+ + + + +
#define PRIu64   "llu"
+
+
+ +
+
+ +
+
+ + + + +
#define PRIx64   "llx"
+
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct SFMT_T sfmt_t
+
+
+ +
+
+ +
+
+ + + + +
typedef union W128_T w128_t
+
+
+ +

128-bit data type

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_fill_array32 (sfmt_tsfmt,
uint32_t * array,
int size 
)
+
+
+ +

This function generates pseudorandom 32-bit integers in the specified array[] by one call.

+

The number of pseudorandom integers is specified by the argument size, which must be at least 624 and a multiple of four. The generation by this function is much faster than the following gen_rand function.

+

For initialization, init_gen_rand or init_by_array must be called before the first call of this function. This function can not be used after calling gen_rand function, without initialization.

+
Parameters:
+ + + + +
sfmtSFMT internal state
arrayan array where pseudorandom 32-bit integers are filled by this function. The pointer to the array must be "aligned" (namely, must be a multiple of 16) in the SIMD version, since it refers to the address of a 128-bit integer. In the standard C version, the pointer is arbitrary.
sizethe number of 32-bit pseudorandom integers to be generated. size must be a multiple of 4, and greater than or equal to (MEXP / 128 + 1) * 4.
+
+
+
Note:
memalign or posix_memalign is available to get aligned memory. Mac OSX doesn't have these functions, but malloc of OSX returns the pointer to the aligned memory block.
+ +

References gen_rand_array(), and SFMT_T::idx.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_fill_array64 (sfmt_tsfmt,
uint64_t * array,
int size 
)
+
+
+ +

This function generates pseudorandom 64-bit integers in the specified array[] by one call.

+

The number of pseudorandom integers is specified by the argument size, which must be at least 312 and a multiple of two. The generation by this function is much faster than the following gen_rand function.

+
Parameters:
+ + + + +
sfmtSFMT internal state For initialization, init_gen_rand or init_by_array must be called before the first call of this function. This function can not be used after calling gen_rand function, without initialization.
arrayan array where pseudorandom 64-bit integers are filled by this function. The pointer to the array must be "aligned" (namely, must be a multiple of 16) in the SIMD version, since it refers to the address of a 128-bit integer. In the standard C version, the pointer is arbitrary.
sizethe number of 64-bit pseudorandom integers to be generated. size must be a multiple of 2, and greater than or equal to (MEXP / 128 + 1) * 2
+
+
+
Note:
memalign or posix_memalign is available to get aligned memory. Mac OSX doesn't have these functions, but malloc of OSX returns the pointer to the aligned memory block.
+ +

References gen_rand_array(), and SFMT_T::idx.

+ +
+
+ +
+
+ + + + + + + + +
void sfmt_gen_rand_all (sfmt_tsfmt)
+
+
+ +

This function fills the internal state array with pseudorandom integers.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+ +

References SFMT_T::state.

+ +

Referenced by sfmt_genrand_uint32(), and sfmt_genrand_uint64().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_genrand_real1 (sfmt_tsfmt) [inline, static]
+
+
+ +

generates a random number on [0,1]-real-interval

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
double on [0,1]-real-interval
+ +

References sfmt_genrand_uint32(), and sfmt_to_real1().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_genrand_real2 (sfmt_tsfmt) [inline, static]
+
+
+ +

generates a random number on [0,1)-real-interval

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
double on [0,1)-real-interval
+ +

References sfmt_genrand_uint32(), and sfmt_to_real2().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_genrand_real3 (sfmt_tsfmt) [inline, static]
+
+
+ +

generates a random number on (0,1)-real-interval

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
double on (0,1)-real-interval
+ +

References sfmt_genrand_uint32(), and sfmt_to_real3().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_genrand_res53 (sfmt_tsfmt) [inline, static]
+
+
+ +

generates a random number on [0,1) with 53-bit resolution

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
double on [0,1) with 53-bit resolution
+ +

References sfmt_genrand_uint64(), and sfmt_to_res53().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_genrand_res53_mix (sfmt_tsfmt) [inline, static]
+
+
+ +

generates a random number on [0,1) with 53-bit resolution using two 32bit integers.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
double on [0,1) with 53-bit resolution
+ +

References sfmt_genrand_uint32(), and sfmt_to_res53_mix().

+ +
+
+ +
+
+ + + + + + + + +
static uint32_t sfmt_genrand_uint32 (sfmt_tsfmt) [inline, static]
+
+
+ +

This function generates and returns 32-bit pseudorandom number.

+

init_gen_rand or init_by_array must be called before this function.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
32-bit pseudorandom number
+ +

References SFMT_T::idx, sfmt_gen_rand_all(), SFMT_T::state, and W128_T::u.

+ +

Referenced by sfmt_genrand_real1(), sfmt_genrand_real2(), sfmt_genrand_real3(), and sfmt_genrand_res53_mix().

+ +
+
+ +
+
+ + + + + + + + +
static uint64_t sfmt_genrand_uint64 (sfmt_tsfmt) [inline, static]
+
+
+ +

This function generates and returns 64-bit pseudorandom number.

+

init_gen_rand or init_by_array must be called before this function. The function gen_rand64 should not be called after gen_rand32, unless an initialization is again executed.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
64-bit pseudorandom number
+ +

References SFMT_T::idx, sfmt_gen_rand_all(), SFMT_T::state, W128_T::u, and W128_T::u64.

+ +

Referenced by sfmt_genrand_res53().

+ +
+
+ +
+
+ + + + + + + + +
const char* sfmt_get_idstring (sfmt_tsfmt)
+
+
+ +

This function returns the identification string.

+

The string shows the word size, the Mersenne exponent, and all parameters of this generator.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + +
int sfmt_get_min_array_size32 (sfmt_tsfmt)
+
+
+ +

This function returns the minimum size of array used for fill_array32() function.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
minimum size of array used for fill_array32() function.
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + +
int sfmt_get_min_array_size64 (sfmt_tsfmt)
+
+
+ +

This function returns the minimum size of array used for fill_array64() function.

+
Parameters:
+ + +
sfmtSFMT internal state
+
+
+
Returns:
minimum size of array used for fill_array64() function.
+ +

References UNUSED_VARIABLE.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sfmt_init_by_array (sfmt_tsfmt,
uint32_t * init_key,
int key_length 
)
+
+
+ +

This function initializes the internal state array, with an array of 32-bit integers used as the seeds.

+
Parameters:
+ + + + +
sfmtSFMT internal state
init_keythe array of 32-bit integers, used as a seed.
key_lengththe length of init_key.
+
+
+ +

References func1(), func2(), SFMT_T::idx, idxof(), period_certification(), SFMT_T::state, and W128_T::u.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void sfmt_init_gen_rand (sfmt_tsfmt,
uint32_t seed 
)
+
+
+ +

This function initializes the internal state array with a 32-bit integer seed.

+
Parameters:
+ + + +
sfmtSFMT internal state
seeda 32-bit integer used as the seed.
+
+
+ +

References SFMT_T::idx, idxof(), period_certification(), SFMT_T::state, and W128_T::u.

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_to_real1 (uint32_t v) [inline, static]
+
+
+ +

converts an unsigned 32-bit number to a double on [0,1]-real-interval.

+
Parameters:
+ + +
v32-bit unsigned integer
+
+
+
Returns:
double on [0,1]-real-interval
+ +

Referenced by sfmt_genrand_real1().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_to_real2 (uint32_t v) [inline, static]
+
+
+ +

converts an unsigned 32-bit integer to a double on [0,1)-real-interval.

+
Parameters:
+ + +
v32-bit unsigned integer
+
+
+
Returns:
double on [0,1)-real-interval
+ +

Referenced by sfmt_genrand_real2().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_to_real3 (uint32_t v) [inline, static]
+
+
+ +

converts an unsigned 32-bit integer to a double on (0,1)-real-interval.

+
Parameters:
+ + +
v32-bit unsigned integer
+
+
+
Returns:
double on (0,1)-real-interval
+ +

Referenced by sfmt_genrand_real3().

+ +
+
+ +
+
+ + + + + + + + +
static double sfmt_to_res53 (uint64_t v) [inline, static]
+
+
+ +

converts an unsigned 32-bit integer to double on [0,1) with 53-bit resolution.

+
Parameters:
+ + +
v32-bit unsigned integer
+
+
+
Returns:
double on [0,1)-real-interval with 53-bit resolution.
+ +

Referenced by sfmt_genrand_res53(), and sfmt_to_res53_mix().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
static double sfmt_to_res53_mix (uint32_t x,
uint32_t y 
) [inline, static]
+
+
+ +

generates a random number on [0,1) with 53-bit resolution from two 32 bit integers

+ +

References sfmt_to_res53().

+ +

Referenced by sfmt_genrand_res53_mix().

+ +
+
+
+ + + + + + diff --git a/SFMT/html/_s_f_m_t_8h_source.html b/SFMT/html/_s_f_m_t_8h_source.html new file mode 100644 index 0000000..9e02e31 --- /dev/null +++ b/SFMT/html/_s_f_m_t_8h_source.html @@ -0,0 +1,261 @@ + + + + + +SFMT: SFMT.h Source File + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+
+
SFMT.h
+
+
+Go to the documentation of this file.
00001 #pragma once
+00002 
+00035 #ifndef SFMTST_H
+00036 #define SFMTST_H
+00037 #if defined(__cplusplus)
+00038 extern "C" {
+00039 #endif
+00040 
+00041 #include <stdio.h>
+00042 #include <assert.h>
+00043 
+00044 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+00045   #include <inttypes.h>
+00046 #elif defined(_MSC_VER) || defined(__BORLANDC__)
+00047   typedef unsigned int uint32_t;
+00048   typedef unsigned __int64 uint64_t;
+00049   #define inline __inline
+00050 #else
+00051   #include <inttypes.h>
+00052   #if defined(__GNUC__)
+00053     #define inline __inline__
+00054   #endif
+00055 #endif
+00056 
+00057 #ifndef PRIu64
+00058   #if defined(_MSC_VER) || defined(__BORLANDC__)
+00059     #define PRIu64 "I64u"
+00060     #define PRIx64 "I64x"
+00061   #else
+00062     #define PRIu64 "llu"
+00063     #define PRIx64 "llx"
+00064   #endif
+00065 #endif
+00066 
+00067 #include "SFMT-params.h"
+00068 
+00069 /*------------------------------------------
+00070   128-bit SIMD like data type for standard C
+00071   ------------------------------------------*/
+00072 #if defined(HAVE_ALTIVEC)
+00073   #if !defined(__APPLE__)
+00074     #include <altivec.h>
+00075   #endif
+00076 
+00077 union W128_T {
+00078     vector unsigned int s;
+00079     uint32_t u[4];
+00080     uint64_t u64[2];
+00081 };
+00082 #elif defined(HAVE_SSE2)
+00083   #include <emmintrin.h>
+00084 
+00086 union W128_T {
+00087     uint32_t u[4];
+00088     uint64_t u64[2];
+00089     __m128i si;
+00090 };
+00091 #else
+00092 
+00093 union W128_T {
+00094     uint32_t u[4];
+00095     uint64_t u64[2];
+00096 };
+00097 #endif
+00098 
+00100 typedef union W128_T w128_t;
+00101 
+00105 struct SFMT_T {
+00107     w128_t state[SFMT_N];
+00109     int idx;
+00110 };
+00111 
+00112 typedef struct SFMT_T sfmt_t;
+00113 
+00114 void sfmt_fill_array32(sfmt_t * sfmt, uint32_t * array, int size);
+00115 void sfmt_fill_array64(sfmt_t * sfmt, uint64_t * array, int size);
+00116 void sfmt_init_gen_rand(sfmt_t * sfmt, uint32_t seed);
+00117 void sfmt_init_by_array(sfmt_t * sfmt, uint32_t * init_key, int key_length);
+00118 const char * sfmt_get_idstring(sfmt_t * sfmt);
+00119 int sfmt_get_min_array_size32(sfmt_t * sfmt);
+00120 int sfmt_get_min_array_size64(sfmt_t * sfmt);
+00121 void sfmt_gen_rand_all(sfmt_t * sfmt);
+00122 
+00123 #ifndef ONLY64
+00124 
+00130 inline static uint32_t sfmt_genrand_uint32(sfmt_t * sfmt) {
+00131     uint32_t r;
+00132     uint32_t * psfmt32 = &sfmt->state[0].u[0];
+00133 
+00134     if (sfmt->idx >= SFMT_N32) {
+00135         sfmt_gen_rand_all(sfmt);
+00136         sfmt->idx = 0;
+00137     }
+00138     r = psfmt32[sfmt->idx++];
+00139     return r;
+00140 }
+00141 #endif
+00142 
+00150 inline static uint64_t sfmt_genrand_uint64(sfmt_t * sfmt) {
+00151 #if defined(BIG_ENDIAN64) && !defined(ONLY64)
+00152     uint32_t * psfmt32 = &sfmt->state[0].u[0];
+00153     uint32_t r1, r2;
+00154 #else
+00155     uint64_t r;
+00156 #endif
+00157     uint64_t * psfmt64 = &sfmt->state[0].u64[0];
+00158     assert(sfmt->idx % 2 == 0);
+00159 
+00160     if (sfmt->idx >= SFMT_N32) {
+00161         sfmt_gen_rand_all(sfmt);
+00162         sfmt->idx = 0;
+00163     }
+00164 #if defined(BIG_ENDIAN64) && !defined(ONLY64)
+00165     r1 = psfmt32[sfmt->idx];
+00166     r2 = psfmt32[sfmt->idx + 1];
+00167     sfmt->idx += 2;
+00168     return ((uint64_t)r2 << 32) | r1;
+00169 #else
+00170     r = psfmt64[sfmt->idx / 2];
+00171     sfmt->idx += 2;
+00172     return r;
+00173 #endif
+00174 }
+00175 
+00176 /* =================================================
+00177    The following real versions are due to Isaku Wada
+00178    ================================================= */
+00184 inline static double sfmt_to_real1(uint32_t v)
+00185 {
+00186     return v * (1.0/4294967295.0);
+00187     /* divided by 2^32-1 */
+00188 }
+00189 
+00195 inline static double sfmt_genrand_real1(sfmt_t * sfmt)
+00196 {
+00197     return sfmt_to_real1(sfmt_genrand_uint32(sfmt));
+00198 }
+00199 
+00205 inline static double sfmt_to_real2(uint32_t v)
+00206 {
+00207     return v * (1.0/4294967296.0);
+00208     /* divided by 2^32 */
+00209 }
+00210 
+00216 inline static double sfmt_genrand_real2(sfmt_t * sfmt)
+00217 {
+00218     return sfmt_to_real2(sfmt_genrand_uint32(sfmt));
+00219 }
+00220 
+00226 inline static double sfmt_to_real3(uint32_t v)
+00227 {
+00228     return (((double)v) + 0.5)*(1.0/4294967296.0);
+00229     /* divided by 2^32 */
+00230 }
+00231 
+00237 inline static double sfmt_genrand_real3(sfmt_t * sfmt)
+00238 {
+00239     return sfmt_to_real3(sfmt_genrand_uint32(sfmt));
+00240 }
+00241 
+00248 inline static double sfmt_to_res53(uint64_t v)
+00249 {
+00250     return v * (1.0/18446744073709551616.0L);
+00251 }
+00252 
+00258 inline static double sfmt_genrand_res53(sfmt_t * sfmt)
+00259 {
+00260     return sfmt_to_res53(sfmt_genrand_uint64(sfmt));
+00261 }
+00262 
+00263 
+00264 /* =================================================
+00265    The following function are added by Saito.
+00266    ================================================= */
+00271 inline static double sfmt_to_res53_mix(uint32_t x, uint32_t y)
+00272 {
+00273     return sfmt_to_res53(x | ((uint64_t)y << 32));
+00274 }
+00275 
+00282 inline static double sfmt_genrand_res53_mix(sfmt_t * sfmt)
+00283 {
+00284     uint32_t x, y;
+00285 
+00286     x = sfmt_genrand_uint32(sfmt);
+00287     y = sfmt_genrand_uint32(sfmt);
+00288     return sfmt_to_res53_mix(x, y);
+00289 }
+00290 
+00291 #if defined(__cplusplus)
+00292 }
+00293 #endif
+00294 
+00295 #endif
+
+ + + + + + diff --git a/SFMT/html/annotated.html b/SFMT/html/annotated.html new file mode 100644 index 0000000..9f67beb --- /dev/null +++ b/SFMT/html/annotated.html @@ -0,0 +1,72 @@ + + + + + +SFMT: Data Structures + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + +
SFMT_TSFMT internal state
W128_T128-bit data structure
+
+ + + + + + diff --git a/SFMT/html/bc_s.png b/SFMT/html/bc_s.png new file mode 100644 index 0000000..51ba006 Binary files /dev/null and b/SFMT/html/bc_s.png differ diff --git a/SFMT/html/bdwn.png b/SFMT/html/bdwn.png new file mode 100644 index 0000000..d0b575b Binary files /dev/null and b/SFMT/html/bdwn.png differ diff --git a/SFMT/html/classes.html b/SFMT/html/classes.html new file mode 100644 index 0000000..357a024 --- /dev/null +++ b/SFMT/html/classes.html @@ -0,0 +1,78 @@ + + + + + +SFMT: Data Structure Index + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+
+
Data Structure Index
+
+
+
S | W
+ + + + + +
  S  
+
  W  
+
SFMT_T   W128_T   
+
S | W
+
+ + + + + + diff --git a/SFMT/html/closed.png b/SFMT/html/closed.png new file mode 100644 index 0000000..b7d4bd9 Binary files /dev/null and b/SFMT/html/closed.png differ diff --git a/SFMT/html/doxygen.css b/SFMT/html/doxygen.css new file mode 100644 index 0000000..c151fde --- /dev/null +++ b/SFMT/html/doxygen.css @@ -0,0 +1,1012 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 13px; + line-height: 1.3; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 8px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + margin-left: 5px; + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 7px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} + diff --git a/SFMT/html/doxygen.png b/SFMT/html/doxygen.png new file mode 100644 index 0000000..635ed52 Binary files /dev/null and b/SFMT/html/doxygen.png differ diff --git a/SFMT/html/files.html b/SFMT/html/files.html new file mode 100644 index 0000000..d583eae --- /dev/null +++ b/SFMT/html/files.html @@ -0,0 +1,72 @@ + + + + + +SFMT: File List + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + +
+
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+ + +
SFMT.cSIMD oriented Fast Mersenne Twister(SFMT)
SFMT.h [code]SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator using C structure
+
+ + + + + + diff --git a/SFMT/html/functions.html b/SFMT/html/functions.html new file mode 100644 index 0000000..2a30376 --- /dev/null +++ b/SFMT/html/functions.html @@ -0,0 +1,84 @@ + + + + + +SFMT: Data Fields + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + +
+
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
+ + + + + + diff --git a/SFMT/html/functions_vars.html b/SFMT/html/functions_vars.html new file mode 100644 index 0000000..52bdbe0 --- /dev/null +++ b/SFMT/html/functions_vars.html @@ -0,0 +1,84 @@ + + + + + +SFMT: Data Fields - Variables + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + +
+
+
+ + + + + + diff --git a/SFMT/html/globals.html b/SFMT/html/globals.html new file mode 100644 index 0000000..6847d69 --- /dev/null +++ b/SFMT/html/globals.html @@ -0,0 +1,213 @@ + + + + + +SFMT: Globals + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + + +
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- p -

+ + +

- s -

+ + +

- u -

+ + +

- w -

+
+ + + + + + diff --git a/SFMT/html/globals_defs.html b/SFMT/html/globals_defs.html new file mode 100644 index 0000000..75903d8 --- /dev/null +++ b/SFMT/html/globals_defs.html @@ -0,0 +1,84 @@ + + + + + +SFMT: Globals + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + +
+
+
+ + + + + + diff --git a/SFMT/html/globals_func.html b/SFMT/html/globals_func.html new file mode 100644 index 0000000..3ae8add --- /dev/null +++ b/SFMT/html/globals_func.html @@ -0,0 +1,185 @@ + + + + + +SFMT: Globals + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + + +
+
+  + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- p -

+ + +

- s -

+
+ + + + + + diff --git a/SFMT/html/globals_type.html b/SFMT/html/globals_type.html new file mode 100644 index 0000000..6147ad6 --- /dev/null +++ b/SFMT/html/globals_type.html @@ -0,0 +1,81 @@ + + + + + +SFMT: Globals + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + +
+
+
+ + + + + + diff --git a/SFMT/html/globals_vars.html b/SFMT/html/globals_vars.html new file mode 100644 index 0000000..76c13e2 --- /dev/null +++ b/SFMT/html/globals_vars.html @@ -0,0 +1,78 @@ + + + + + +SFMT: Globals + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + + + +
+
+
+ + + + + + diff --git a/SFMT/html/howto-compile.html b/SFMT/html/howto-compile.html new file mode 100644 index 0000000..8d08d1e --- /dev/null +++ b/SFMT/html/howto-compile.html @@ -0,0 +1,493 @@ + + + + + + How to compile SFMT + + + +

How to compile SFMT

+ +

+ This document explains how to compile SFMT for users who + are using UNIX like systems (for example Linux, Free BSD, + cygwin, osx, etc) on terminal. I can't help those who use IDE + (Integrated Development Environment,) please see your IDE's help + to use SIMD feature of your CPU. +

+ +

1. First Step: Compile test programs using Makefile.

+

1-1. Compile standard C test program.

+

+ Check if SFMT.c and Makefile are in your current directory. + If not, cd to the directory where they exist. + Then, type +

+
+
make std
+
+

+ If it causes an error, try to type +

+
+
cc -DSFMT_MEXP=19937 -o test-std-M19937 test.c SFMT.c
+
+

+ or try to type +

+
+
gcc -DSFMT_MEXP=19937 -o test-std-M19937 test.c SFMT.c
+
+

+ If success, then check the test program. Type +

+
+
./test-std-M19937 -b32
+
+

+ You will see many random numbers displayed on your screen. + If you want to check these random numbers are correct output, + redirect output to a file and diff it with + SFMT.19937.out.txt, like this:

+
+
./test-std-M19937 -b32 > foo.txt
+diff -w foo.txt SFMT.19937.out.txt
+
+

+ Silence means they are the same because diff + reports the difference of two file. +

+

+ If you want to know the generation speed of SFMT, type +

+
+
./test-std-M19937 -s
+
+

+ It is very slow. To make it fast, compile it + with -O3 option. If your compiler is gcc, you + should specify -fno-strict-aliasing option + with -O3. type +

+
+
gcc -O3 -fno-strict-aliasing -DSFMT_MEXP=19937 -o test-std-M19937 test.c SFMT.c
+./test-std-M19937 -s
+
+ +

1-2. Compile SSE2 test program.

+

+ If your CPU supports SSE2 and you can use gcc version 3.4 or later, + you can make test-sse2-Mxxx. To do this, type +

+
+
make sse2
+
+

or type

+
+
gcc -O3 -msse2 -fno-strict-aliasing -DHAVE_SSE2=1 -DSFMT_MEXP=19937 -o test-sse2-M19937 test.c SFMT.c
+
+

If everything works well,

+
+
./test-sse2-M19937 -s
+
+

will show much shorter time than test-std-M19937 -s.

+ + + +

1-4. Compile and check output automatically.

+

+ To make test program and check 32-bit output + automatically for all supported MEXPs of SFMT, type +

+
+
make std-check
+
+ +

+ To check test program optimized for SSE2, type +

+
+
make sse2-check
+
+ +

+ These commands may take some time. +

+ +

2. Second Step: Use SFMT pseudorandom number generator with + your C program.

+

2-1. Use sequential call and static link.

+

+ Here is a very simple program sample1.c which + calculates PI using Monte-Carlo method. +

+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "SFMT.h"
+
+int main(int argc, char* argv[]) {
+    int i, cnt, seed;
+    double x, y, pi;
+    const int NUM = 10000;
+    sfmt_t sfmt;
+
+    if (argc >= 2) {
+	seed = strtol(argv[1], NULL, 10);
+    } else {
+	seed = 12345;
+    }
+    cnt = 0;
+    sfmt_init_gen_rand(&sfmt, seed);
+    for (i = 0; i < NUM; i++) {
+	x = sfmt_genrand_res53(&sfmt);
+	y = sfmt_genrand_res53(&sfmt);
+	if (x * x + y * y < 1.0) {
+	    cnt++;
+	}
+    }
+    pi = (double)cnt / NUM * 4;
+    printf("%lf\n", pi);
+    return 0;
+}
+      
+
+

To compile sample1.c with SFMT.c with the period of + 2607, type

+
+
gcc -O3 -DSFMT_MEXP=607 -o sample1 SFMT.c sample1.c
+
+ +

If your CPU supports SSE2 and you want to use optimized SFMT for + SSE2, type

+
+
gcc -O3 -msse2 -DHAVE_SSE2 -DSFMT_MEXP=607 -o sample1 SFMT.c sample1.c
+
+ + +

2-2. Use block call and static link.

+

+ Here is sample2.c which modifies sample1.c. + The block call fill_array64 is much faster than + sequential call, but it needs an aligned memory. The standard function + to get an aligned memory is posix_memalign, but + it isn't usable in every OS. +

+
+
+#include <stdio.h>
+#define _XOPEN_SOURCE 600
+#include <stdlib.h>
+#include "SFMT.h"
+
+int main(int argc, char* argv[]) {
+    int i, j, cnt, seed;
+    double x, y, pi;
+    const int NUM = 10000;
+    const int R_SIZE = 2 * NUM;
+    int size;
+    uint64_t *array;
+    sfmt_t sfmt;
+
+    if (argc >= 2) {
+	seed = strtol(argv[1], NULL, 10);
+    } else {
+	seed = 12345;
+    }
+    size = sfmt_get_min_array_size64(&sfmt);
+    if (size < R_SIZE) {
+	size = R_SIZE;
+    }
+#if defined(__APPLE__) || \
+    (defined(__FreeBSD__) && __FreeBSD__ >= 3 && __FreeBSD__ <= 6)
+    printf("malloc used\n");
+    array = malloc(sizeof(double) * size);
+    if (array == NULL) {
+	printf("can't allocate memory.\n");
+	return 1;
+    }
+#elif defined(_POSIX_C_SOURCE)
+    printf("posix_memalign used\n");
+    if (posix_memalign((void **)&array, 16, sizeof(double) * size) != 0) {
+	printf("can't allocate memory.\n");
+	return 1;
+    }
+#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+    printf("memalign used\n");
+    array = memalign(16, sizeof(double) * size);
+    if (array == NULL) {
+	printf("can't allocate memory.\n");
+	return 1;
+    }
+#else /* in this case, gcc doesn't support SSE2 */
+    printf("malloc used\n");
+    array = malloc(sizeof(double) * size);
+    if (array == NULL) {
+	printf("can't allocate memory.\n");
+	return 1;
+    }
+#endif
+    cnt = 0;
+    j = 0;
+    sfmt_init_gen_rand(&sfmt, seed);
+    sfmt_fill_array64(&sfmt, array, size);
+    for (i = 0; i < NUM; i++) {
+	x = sfmt_to_res53(array[j++]);
+	y = sfmt_to_res53(array[j++]);
+	if (x * x + y * y < 1.0) {
+	    cnt++;
+	}
+    }
+    free(array);
+    pi = (double)cnt / NUM * 4;
+    printf("%lf\n", pi);
+    return 0;
+}
+      
+
+

To compile sample2.c with SFMT.c with the period of + 22281, type

+
+
gcc -O3 -DSFMT_MEXP=2281 -o sample2 SFMT.c sample2.c
+
+ +

If your CPU supports SSE2 and you want to use optimized SFMT for + SSE2, type

+
+
gcc -O3 -msse2 -DHAVE_SSE2 -DSFMT_MEXP=2281 -o sample2 SFMT.c sample2.c
+
+ + + +

2-4. Initialize SFMT using sfmt_init_by_array function.

+

+ Here is sample4.c which modifies sample1.c. + The 32-bit integer seed can only make 232 kinds of + initial state, to avoid this problem, SFMT + provides sfmt_init_by_array function. This sample + uses sfmt_init_by_array function which initialize the internal state + array with an array of 32-bit. The size of an array can be + larger than the internal state array and all elements of the + array are used for initialization, but too large array is + wasteful. +

+
+
+#include <stdio.h>
+#include <string.h>
+#include "SFMT.h"
+
+int main(int argc, char* argv[]) {
+    int i, cnt, seed_cnt;
+    double x, y, pi;
+    const int NUM = 10000;
+    uint32_t seeds[100];
+    sfmt_t sfmt;
+
+    if (argc >= 2) {
+	seed_cnt = 0;
+	for (i = 0; (i < 100) && (i < strlen(argv[1])); i++) {
+	    seeds[i] = argv[1][i];
+	    seed_cnt++;
+	}
+    } else {
+	seeds[0] = 12345;
+	seed_cnt = 1;
+    }
+    cnt = 0;
+    sfmt_init_by_array(&sfmt, seeds, seed_cnt);
+    for (i = 0; i < NUM; i++) {
+	x = sfmt_genrand_res53(&sfmt);
+	y = sfmt_genrand_res53(&sfmt);
+	if (x * x + y * y < 1.0) {
+	    cnt++;
+	}
+    }
+    pi = (double)cnt / NUM * 4;
+    printf("%lf\n", pi);
+    return 0;
+}
+      
+
+

To compile sample4.c, type

+
+
gcc -O3 -DSFMT_MEXP=19937 -o sample4 SFMT.c sample4.c
+
+ +

Now, seed can be a string. Like this:

+
+
./sample4 your-full-name
+
+

Appendix: C preprocessor definitions

+

+ Here is a list of C preprocessor definitions that users can + specify to control code generation. These macros must be set + just after -D compiler option. +

+
+
SFMT_MEXP
+
This macro is required. This macro means Mersenne exponent + and the period of generated code will be 2SFMT_MEXP-1. + SFMT_MEXP must be one of 607, 1279, 2281, 4253, 11213, 19937, + 44497, 86243, 132049, 216091. +
+
HAVE_SSE2
+
This is optional. If this macro is specified, optimized code + for SSE2 will be generated.
+
HAVE_ALTIVEC
+
This is optional. If this macro is specified, optimized code + for AltiVec will be generated. This macro automatically turns on + BIG_ENDIAN64 macro. This macro of SFMT ver. 1.4 is not tested + at all.
+
BIG_ENDIAN64
+
This macro is required when your CPU is BIG ENDIAN and you + use 64-bit output. If __BIG_ENDIAN__ macro is defined, this macro + is automatically turned on. GCC defines __BIG_ENDIAN__ macro on + BIG ENDIAN CPUs. This macro of SFMT ver. 1.4 is not tested + at all.
+
ONLY64
+
This macro is optional. If this macro is specified, + optimized code for 64-bit output for BIG ENDIAN CPUs will be + generated and code for 32-bit output won't be + generated. BIG_ENDIAN64 macro must be specified with this macro + by user or automatically. This macro of SFMT ver. 1.4 is not tested + at all.
+
+ + + + + + +
32-bit outputLITTLE ENDIAN 64-bit outputBIG ENDIAN 64-bit output
requiredSFMT_MEXPSFMT_MEXPSFMT_MEXP, + BIG_ENDIAN64
optionalHAVE_SSE2, + HAVE_ALTIVECHAVE_SSE2HAVE_ALTIVEC, ONLY64
+ + diff --git a/SFMT/html/index.html b/SFMT/html/index.html new file mode 100644 index 0000000..3c9dcff --- /dev/null +++ b/SFMT/html/index.html @@ -0,0 +1,123 @@ + + + + + +SFMT: Main Page + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
SFMT +  1.4 +
+ +
+
+ + + +
+
+
+
SFMT Documentation
+
+
+

This is SIMD oriented Fast Mersenne Twister pseudorandom number generator(SFMT). This Project provides pseudorandom number generators of various Mersenne Prime Period: from 2607-1 to 2216091-1.

+

Please check endianness in source codes carefully, if you are using BIG ENDIAN.

+ +
Author:
Mutsuo Saito (saito.nosp@m.@mat.nosp@m.h.sci.nosp@m..hir.nosp@m.oshim.nosp@m.a-u..nosp@m.ac.jp) (Hiroshima University)
+
+Makoto Matsumoto (The University of Tokyo)
+
Date:
2012-6-27
+

Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. All rights reserved. Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.

+

The 3-clause BSD License is applied to this software, see LICENSE.txt

+
Copyright (c) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+University.
+Copyright (c) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University
+and The University of Tokyo.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the names of Hiroshima University, The University of
+      Tokyo nor the names of its contributors may be used to endorse
+      or promote products derived from this software without specific
+      prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ + + + + + diff --git a/SFMT/html/jquery.js b/SFMT/html/jquery.js new file mode 100644 index 0000000..90b3a2b --- /dev/null +++ b/SFMT/html/jquery.js @@ -0,0 +1,64 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) +{I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() +{G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); + +/* + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('