Beispiel #1
0
def daub6_test ( ):

#*****************************************************************************80
#
## DAUB6_TEST tests DAUB6.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    11 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'DAUB6_TEST'
  print '  DAUB6 computes the DAUB6 matrix.'

  m = 12
  n = m

  a = daub6 ( n )
  r8mat_print ( m, n, a, '  DAUB6 matrix:' )

  print ''
  print 'DAUB6_TEST'
  print '  Normal end of execution.'

  return
Beispiel #2
0
def rutis1_test ( ):

#*****************************************************************************80
#
## RUTIS1_TEST tests RUTIS1.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    24 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'RUTIS1_TEST'
  print '  RUTIS1 computes the RUTIS1 matrix.'

  n = 4
  a = rutis1 ( )
  r8mat_print ( n, n, a, '  RUTIS1 matrix:' )

  print ''
  print 'RUTIS1_TEST'
  print '  Normal end of execution.'

  return
Beispiel #3
0
def a123_test():

    #*****************************************************************************80
    #
    ## A123_TEST tests A123.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    10 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'A123_TEST'
    print '  A123 computes the A123 matrix.'

    n = 3
    a = a123()
    r8mat_print(n, n, a, '  A123 matrix:')

    print ''
    print 'A123_TEST'
    print '  Normal end of execution.'

    return
Beispiel #4
0
def rosser1_test ( ):

#*****************************************************************************80
#
## ROSSER1_TEST tests ROSSER1.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    10 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'ROSSER1_TEST'
  print '  ROSSER1 computes the ROSSER1 matrix.'

  n = 8
  a = rosser1 ( )
  r8mat_print ( n, n, a, '  ROSSER1 matrix:' )

  print ''
  print 'ROSSER1_TEST'
  print '  Normal end of execution.'

  return
Beispiel #5
0
def r8mat_data_read_test():

    #*****************************************************************************80
    #
    ## R8MAT_DATA_READ_TEST tests R8MAT_DATA_READ.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    03 December 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'R8MAT_DATA_READ_TEST:'
    print '  Test R8MAT_DATA_READ, which reads data from an R8MAT.'

    m = 5
    n = 3
    filename = 'r8mat_write_test.txt'
    a = r8mat_data_read(filename, m, n)
    r8mat_print(m, n, a, '  Data read from file:')

    print ''
    print 'R8MAT_DATA_READ_TEST:'
    print '  Normal end of execution.'

    return
Beispiel #6
0
def moler4_test():

    #*****************************************************************************80
    #
    ## MOLER4_TEST tests MOLER4.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'MOLER4_TEST'
    print '  MOLER4 computes the MOLER4 matrix.'

    m = 4
    n = m

    a = moler4()
    r8mat_print(m, n, a, '  MOLER4 matrix:')

    print ''
    print 'MOLER4_TEST'
    print '  Normal end of execution.'

    return
Beispiel #7
0
def clement1_test():

    #*****************************************************************************80
    #
    ## CLEMENT1_TEST tests CLEMENT1.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 December 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'CLEMENT1_TEST'
    print '  CLEMENT1 computes the CLEMENT1 matrix.'

    m = 4
    n = m
    a = clement1(n)
    r8mat_print(n, n, a, '  CLEMENT1 matrix:')

    print ''
    print 'CLEMENT1_TEST'
    print '  Normal end of execution.'

    return
Beispiel #8
0
def ring_adj_test ( ):

#*****************************************************************************80
#
## RING_ADJ_TEST tests RING_ADJ.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    12 March 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'RING_ADJ_TEST'
  print '  RING_ADJ computes the RING_ADJ matrix.'

  m = 6
  n = m

  a = ring_adj ( m, n )
  r8mat_print ( m, n, a, '  RING_ADJ matrix:' )

  print ''
  print 'RING_ADJ_TEST'
  print '  Normal end of execution.'

  return
Beispiel #9
0
def moler3_test ( ):

#*****************************************************************************80
#
## MOLER3_TEST tests MOLER3.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    26 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'MOLER3_TEST'
  print '  MOLER3 computes the MOLER3 matrix.'

  m = 5
  n = m

  a = moler3 ( m, n )
  r8mat_print ( m, n, a, '  MOLER3 matrix:' )

  print ''
  print 'MOLER3_TEST'
  print '  Normal end of execution.'

  return
Beispiel #10
0
def complex_i_test():

    #*****************************************************************************80
    #
    ## COMPLEX_I_TEST tests COMPLEX_I.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    09 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'COMPLEX_I_TEST'
    print '  COMPLEX_I computes the COMPLEX_I matrix.'

    m = 2
    n = m

    a = complex_i()
    r8mat_print(m, n, a, '  COMPLEX_I matrix:')

    print ''
    print 'COMPLEX_I_TEST'
    print '  Normal end of execution.'

    return
Beispiel #11
0
def one_test ( ):

#*****************************************************************************80
#
## ONE_TEST tests ONE.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    20 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'ONE_TEST'
  print '  ONE computes the ONE matrix.'

  m = 4
  n = m

  a = one ( m, n )
  r8mat_print ( m, n, a, '  ONE matrix:' )

  print ''
  print 'ONE_TEST'
  print '  Normal end of execution.'

  return
Beispiel #12
0
def complex_i_test ( ):

#*****************************************************************************80
#
## COMPLEX_I_TEST tests COMPLEX_I.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    09 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'COMPLEX_I_TEST'
  print '  COMPLEX_I computes the COMPLEX_I matrix.'

  m = 2
  n = m

  a = complex_i ( )
  r8mat_print ( m, n, a, '  COMPLEX_I matrix:' )

  print ''
  print 'COMPLEX_I_TEST'
  print '  Normal end of execution.'

  return
def archimedes_test ( ):

#*****************************************************************************80
#
## ARCHIMEDES_TEST tests ARCHIMEDES.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    11 March 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'ARCHIMEDES_TEST'
  print '  ARCHIMEDES computes the ARCHIMEDES matrix.'

  m = 7
  n = 8
  a = archimedes ( )
  r8mat_print ( m, n, a, '  ARCHIMEDES matrix:' )

  print ''
  print 'ARCHIMEDES_TEST'
  print '  Normal end of execution.'

  return
Beispiel #14
0
def kershaw_test():

    #*****************************************************************************80
    #
    ## KERSHAW_TEST tests KERSHAW.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    17 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'KERSHAW_TEST'
    print '  KERSHAW computes the KERSHAW matrix.'

    n = 4
    a = kershaw()
    r8mat_print(n, n, a, '  KERSHAW matrix:')

    print ''
    print 'KERSHAW_TEST'
    print '  Normal end of execution.'

    return
Beispiel #15
0
def eulerian_test():

    #*****************************************************************************80
    #
    ## EULERIAN_TEST tests EULERIAN.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    25 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'EULERIAN_TEST'
    print '  EULERIAN computes the EULERIAN matrix.'

    m = 4
    n = m

    a = eulerian(m, n)
    r8mat_print(m, n, a, '  EULERIAN matrix:')

    print ''
    print 'EULERIAN_TEST'
    print '  Normal end of execution.'

    return
Beispiel #16
0
def frank_test():

    #*****************************************************************************80
    #
    ## FRANK_TEST tests FRANK.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    04 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'FRANK_TEST'
    print '  FRANK computes the FRANK matrix.'

    m = 5
    n = m
    a = frank(n)
    r8mat_print(m, n, a, '  FRANK matrix:')

    print ''
    print 'FRANK_TEST'
    print '  Normal end of execution.'

    return
Beispiel #17
0
def one_test():

    #*****************************************************************************80
    #
    ## ONE_TEST tests ONE.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    20 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'ONE_TEST'
    print '  ONE computes the ONE matrix.'

    m = 4
    n = m

    a = one(m, n)
    r8mat_print(m, n, a, '  ONE matrix:')

    print ''
    print 'ONE_TEST'
    print '  Normal end of execution.'

    return
Beispiel #18
0
def eulerian_test ( ):

#*****************************************************************************80
#
## EULERIAN_TEST tests EULERIAN.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    25 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'EULERIAN_TEST'
  print '  EULERIAN computes the EULERIAN matrix.'

  m = 4
  n = m

  a = eulerian ( m, n )
  r8mat_print ( m, n, a, '  EULERIAN matrix:' )

  print ''
  print 'EULERIAN_TEST'
  print '  Normal end of execution.'

  return
Beispiel #19
0
def cheby_van2_test():

    #*****************************************************************************80
    #
    ## CHEBY_VAN2_TEST tests CHEBY_VAN2.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    22 December 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'CHEBY_VAN2_TEST'
    print '  CHEBY_VAN2 computes the CHEBY_VAN2 matrix.'

    m = 5
    n = 5
    a = cheby_van2(n)
    r8mat_print(m, n, a, '  CHEBY_VAN2 matrix:')

    print ''
    print 'CHEBY_VAN2_TEST'
    print '  Normal end of execution.'

    return
Beispiel #20
0
def parter_test():

    #*****************************************************************************80
    #
    ## PARTER_TEST tests PARTER.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'PARTER_TEST'
    print '  PARTER computes the PARTER matrix.'

    m = 4
    n = m

    a = parter(m, n)
    r8mat_print(m, n, a, '  PARTER matrix:')

    print ''
    print 'PARTER_TEST'
    print '  Normal end of execution.'

    return
def sylvester_kac_test ( ):

#*****************************************************************************80
#
## SYLVESTER_KAC_TEST tests SYLVESTER_KAC.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    13 April 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'SYLVESTER_KAC_TEST'
  print '  SYLVESTER_KAC computes the SYLVESTER_KAC matrix.'

  m = 5
  n = m
  a = sylvester_kac ( n )
  r8mat_print ( m, n, a, '  SYLVESTER_KAC matrix:' )

  print ''
  print 'SYLVESTER_KAC_TEST'
  print '  Normal end of execution.'

  return
Beispiel #22
0
def rutis2_test ( ):

#*****************************************************************************80
#
## RUTIS2_TEST tests RUTIS2.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    27 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'RUTIS2_TEST'
  print '  RUTIS2 computes the RUTIS2 matrix.'

  n = 4
  a = rutis2 ( )
  r8mat_print ( n, n, a, '  RUTIS2 matrix:' )

  print ''
  print 'RUTIS2_TEST'
  print '  Normal end of execution.'

  return
Beispiel #23
0
def oto_test ( ):

#*****************************************************************************80
#
## OTO_TEST tests OTO.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    22 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'OTO_TEST'
  print '  OTO computes the OTO matrix.'

  m = 5
  n = m
  a = oto ( m, n )
  r8mat_print ( m, n, a, '  OTO matrix:' )

  print ''
  print 'OTO_TEST'
  print '  Normal end of execution.'

  return
Beispiel #24
0
def bauer_test ( ):

#*****************************************************************************80
#
## BAUER_TEST tests BAUER.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    26 March 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'BAUER_TEST'
  print '  BAUER computes the BAUER matrix.'

  n = 6
  a = bauer ( )
  r8mat_print ( n, n, a, '  BAUER matrix:' )

  print ''
  print 'BAUER_TEST'
  print '  Normal end of execution.'

  return
def fibonacci2_test ( ):

#*****************************************************************************80
#
## FIBONACCI2_TEST tests FIBONACCI2.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    28 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'FIBONACCI2_TEST'
  print '  FIBONACCI2 computes the FIBONACCI2 matrix.'

  m = 5
  n = m

  a = fibonacci2 ( n )
  r8mat_print ( m, n, a, '  FIBONACCI2 matrix:' )

  print ''
  print 'FIBONACCI2_TEST'
  print '  Normal end of execution.'

  return
Beispiel #26
0
def rosser1_test():

    #*****************************************************************************80
    #
    ## ROSSER1_TEST tests ROSSER1.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    10 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'ROSSER1_TEST'
    print '  ROSSER1 computes the ROSSER1 matrix.'

    n = 8
    a = rosser1()
    r8mat_print(n, n, a, '  ROSSER1 matrix:')

    print ''
    print 'ROSSER1_TEST'
    print '  Normal end of execution.'

    return
def r8mat_data_read_test ( ):

#*****************************************************************************80
#
## R8MAT_DATA_READ_TEST tests R8MAT_DATA_READ.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    03 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'R8MAT_DATA_READ_TEST:'
  print '  Test R8MAT_DATA_READ, which reads data from an R8MAT.'

  m = 5
  n = 3
  filename = 'r8mat_write_test.txt'
  a = r8mat_data_read ( filename, m, n )
  r8mat_print ( m, n, a, '  Data read from file:' )

  print ''
  print 'R8MAT_DATA_READ_TEST:'
  print '  Normal end of execution.'

  return
Beispiel #28
0
def maxij_test():

    # *****************************************************************************80
    #
    ## MAXIJ_TEST tests MAXIJ.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ""
    print "MAXIJ_TEST"
    print "  MAXIJ computes the MAXIJ matrix."

    m = 5
    n = 5
    a = maxij(m, n)
    r8mat_print(m, n, a, "  MAXIJ matrix:")

    print ""
    print "MAXIJ_TEST"
    print "  Normal end of execution."

    return
Beispiel #29
0
def identity_test ( ):

#*****************************************************************************80
#
## IDENTITY_TEST tests IDENTITY.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    14 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'IDENTITY_TEST'
  print '  IDENTITY computes the IDENTITY matrix.'

  m = 4
  n = m

  a = identity ( m, n )
  r8mat_print ( m, n, a, '  IDENTITY matrix:' )

  print ''
  print 'IDENTITY_TEST'
  print '  Normal end of execution.'

  return
Beispiel #30
0
def fibonacci3_test():

    #*****************************************************************************80
    #
    ## FIBONACCI3_TEST tests FIBONACCI3.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    29 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'FIBONACCI3_TEST'
    print '  FIBONACCI3 computes the FIBONACCI3 matrix.'

    m = 5
    n = m

    a = fibonacci3(n)
    r8mat_print(m, n, a, '  FIBONACCI3 matrix:')

    print ''
    print 'FIBONACCI3_TEST'
    print '  Normal end of execution.'

    return
Beispiel #31
0
def parter_test ( ):

#*****************************************************************************80
#
## PARTER_TEST tests PARTER.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    26 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'PARTER_TEST'
  print '  PARTER computes the PARTER matrix.'

  m = 4
  n = m

  a = parter ( m, n )
  r8mat_print ( m, n, a, '  PARTER matrix:' )

  print ''
  print 'PARTER_TEST'
  print '  Normal end of execution.'

  return
def permutation_random_test ( ):

#*****************************************************************************80
#
## PERMUTATION_RANDOM_TEST tests PERMUTATION_RANDOM.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    27 March 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'PERMUTATION_RANDOM_TEST'
  print '  PERMUTATION_RANDOM computes the PERMUTATION_RANDOM matrix.'

  n = 5

  key = 123456789
  a = permutation_random ( n, key )
  r8mat_print ( n, n, a, '  PERMUTATION_RANDOM matrix:' )

  print ''
  print 'PERMUTATION_RANDOM_TEST'
  print '  Normal end of execution.'

  return
Beispiel #33
0
def wilk05_test ( ):

#*****************************************************************************80
#
## WILK05_TEST tests WILK05.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    07 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'WILK05_TEST'
  print '  WILK05 computes the WILK05 matrix.'

  n = 5
  a = wilk05 ( )
  r8mat_print ( n, n, a, '  WILK05 matrix:' )

  print ''
  print 'WILK05_TEST'
  print '  Normal end of execution.'

  return
Beispiel #34
0
def fourier_sine_test():

    #*****************************************************************************80
    #
    ## FOURIER_SINE_TEST tests FOURIER_SINE.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    04 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'FOURIER_SINE_TEST'
    print '  FOURIER_SINE computes the FOURIER_SINE matrix.'

    m = 5
    n = m

    a = fourier_sine(n)
    r8mat_print(m, n, a, '  FOURIER_SINE matrix:')

    print ''
    print 'FOURIER_SINE_TEST'
    print '  Normal end of execution.'

    return
Beispiel #35
0
def conex4_test():

    # *****************************************************************************80
    #
    ## CONEX4_TEST tests CONEX4.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    20 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ""
    print "CONEX4_TEST"
    print "  CONEX4 computes the CONEX4 matrix."

    m = 4
    n = m

    a = conex4()
    r8mat_print(m, n, a, "  CONEX4 matrix:")

    print ""
    print "CONEX4_TEST"
    print "  Normal end of execution."

    return
Beispiel #36
0
def lesp_test():

    #*****************************************************************************80
    #
    ## LESP_TEST tests LESP.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'LESP_TEST'
    print '  LESP computes the LESP matrix.'

    m = 5
    n = m

    a = lesp(m, n)
    r8mat_print(m, n, a, '  LESP matrix:')

    print ''
    print 'LESP_TEST'
    print '  Normal end of execution.'

    return
def conference_test ( ):

#*****************************************************************************80
#
## CONFERENCE_TEST tests CONFERENCE.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    19 April 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'CONFERENCE_TEST'
  print '  CONFERENCE computes the CONFERENCE matrix.'
#
#  Note that N-1 must be an odd prime or a power of an odd prime.
#
  n = 6
  a = conference ( n )
  r8mat_print ( n, n, a, '  CONFERENCE matrix:' )

  print ''
  print 'CONFERENCE_TEST'
  print '  Normal end of execution.'

  return
Beispiel #38
0
def conex4_test ( ):

#*****************************************************************************80
#
## CONEX4_TEST tests CONEX4.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    20 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'CONEX4_TEST'
  print '  CONEX4 computes the CONEX4 matrix.'

  m = 4
  n = m

  a = conex4 ( )
  r8mat_print ( m, n, a, '  CONEX4 matrix:' )

  print ''
  print 'CONEX4_TEST'
  print '  Normal end of execution.'

  return
Beispiel #39
0
def zero_test():

    #*****************************************************************************80
    #
    ## ZERO_TEST tests ZERO.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    27 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'ZERO_TEST'
    print '  ZERO computes the ZERO matrix.'

    m = 4
    n = m

    a = zero(m, n)
    r8mat_print(m, n, a, '  ZERO matrix:')

    print ''
    print 'ZERO_TEST'
    print '  Normal end of execution.'

    return
Beispiel #40
0
def orth_symm_test ( ):

#*****************************************************************************80
#
## ORTH_SYMM_TEST tests ORTH_SYMM.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    05 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'ORTH_SYMM_TEST'
  print '  ORTH_SYMM computes the ORTH_SYMM matrix.'

  m = 5
  n = 5
  a = orth_symm ( n )
  r8mat_print ( m, n, a, '  ORTH_SYMM matrix:' )

  print ''
  print 'ORTH_SYMM_TEST'
  print '  Normal end of execution.'

  return
Beispiel #41
0
def sweet2_test():

    #*****************************************************************************80
    #
    ## SWEET2_TEST tests SWEET2.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    25 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'SWEET2_TEST'
    print '  SWEET2 computes the SWEET2 matrix.'

    n = 6
    a = sweet2()
    r8mat_print(n, n, a, '  SWEET2 matrix:')

    print ''
    print 'SWEET2_TEST'
    print '  Normal end of execution.'

    return
Beispiel #42
0
def daub4_test():

    #*****************************************************************************80
    #
    ## DAUB4_TEST tests DAUB4.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    11 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'DAUB4_TEST'
    print '  DAUB4 computes the DAUB4 matrix.'

    m = 8
    n = m

    a = daub4(n)
    r8mat_print(m, n, a, '  DAUB4 matrix:')

    print ''
    print 'DAUB4_TEST'
    print '  Normal end of execution.'

    return
Beispiel #43
0
def harman_test ( ):

#*****************************************************************************80
#
## HARMAN_TEST tests HARMAN.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    10 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'HARMAN_TEST'
  print '  HARMAN computes the HARMAN matrix.'

  n = 8
  a = harman ( )
  r8mat_print ( n, n, a, '  HARMAN matrix:' )

  print ''
  print 'HARMAN_TEST'
  print '  Normal end of execution.'

  return
Beispiel #44
0
def wilson_test ( ):

#*****************************************************************************80
#
## WILSON_TEST tests WILSON.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    20 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'WILSON_TEST'
  print '  WILSON computes the WILSON matrix.'

  n = 4
  a = wilson ( )
  r8mat_print ( n, n, a, '  WILSON matrix:' )

  print ''
  print 'WILSON_TEST'
  print '  Normal end of execution.'

  return
Beispiel #45
0
def cheby_u_test ( ):

#*****************************************************************************80
#
## CHEBY_U_TEST tests CHEBY_U.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    01 January 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'CHEBY_U_TEST'
  print '  CHEBY_U computes the CHEBY_U matrix.'

  m = 5
  n = m
  a = cheby_u ( n )
  r8mat_print ( m, n, a, '  CHEBY_U matrix:' )

  print ''
  print 'CHEBY_U_TEST'
  print '  Normal end of execution.'

  return
def sylvester_kac_test():

    #*****************************************************************************80
    #
    ## SYLVESTER_KAC_TEST tests SYLVESTER_KAC.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    13 April 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'SYLVESTER_KAC_TEST'
    print '  SYLVESTER_KAC computes the SYLVESTER_KAC matrix.'

    m = 5
    n = m
    a = sylvester_kac(n)
    r8mat_print(m, n, a, '  SYLVESTER_KAC matrix:')

    print ''
    print 'SYLVESTER_KAC_TEST'
    print '  Normal end of execution.'

    return
Beispiel #47
0
def bodewig_test():

    #*****************************************************************************80
    #
    ## BODEWIG_TEST tests BODEWIG.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    14 December 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'BODEWIG_TEST'
    print '  BODEWIG computes the BODEWIG matrix.'

    n = 4
    a = bodewig()
    r8mat_print(n, n, a, '  BODEWIG matrix:')

    print ''
    print 'BODEWIG_TEST'
    print '  Normal end of execution.'

    return
Beispiel #48
0
def boothroyd_test ( ):

#*****************************************************************************80
#
## BOOTHROYD_TEST tests BOOTHROYD.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    27 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'BOOTHROYD_TEST'
  print '  BOOTHROYD computes the BOOTHROYD matrix.'

  m = 5
  n = m
  a = boothroyd ( n )
  r8mat_print ( m, n, a, '  BOOTHROYD matrix:' )

  print ''
  print 'BOOTHROYD_TEST'
  print '  Normal end of execution.'

  return
def xy_to_rs_map_test ( ):

#*****************************************************************************80
#
## XY_TO_RS_MAP_TEST tests XY_TO_RS_MAP.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    22 April 2015
#
#  Author:
#
#    John Burkardt
#
  import numpy as np
  from r8mat_print import r8mat_print

  print ''
  print 'XY_TO_RS_MAP_TEST:'
  print '  XY_TO_RS_MAP determines the coefficients of the linear map'
  print '  from a general triangle in XY coordinates to the reference'
  print '  triangle in RS coordinates:'
  print '    R = a + b * X + c * Y'
  print '    S = d + e * X + f * Y'

  t = np.array ( [ \
    [ 2.0, 0.0 ], \
    [ 3.0, 4.0 ], \
    [ 0.0, 3.0 ] ] )

  r8mat_print ( 3, 2, t, '  XY triangle vertices:' )

  a, b, c, d, e, f = xy_to_rs_map ( t )

  print ''
  print '  Mapping coefficients are:'
  print ''
  print '    R = %g + %g * X + %g * Y' % ( a, b, c )
  print '    S = %g + %g * X + %g * Y' % ( d, e, f )

  print ''
  print '  Apply map to XY triangle vertices.'
  print '  Recover RS vertices (0,0), (1,0) and (0,1).'
  print ''
  for i in range ( 0, 3 ):
    r = a + b * t[i,0] + c * t[i,1]
    s = d + e * t[i,0] + f * t[i,1]
    print '  V(%d) = (%g,%g)' % ( i, r, s )
#
#  Terminate.
#
  print ''
  print 'XY_TO_RS_MAP_TEST:'
  print '  Normal end of execution.'

  return
Beispiel #50
0
def biw_test():

    #*****************************************************************************80
    #
    ## BIW_TEST tests BIW.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    25 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'BIW_TEST'
    print '  BIW computes the BIW matrix.'

    m = 5
    n = 5
    a = biw(n)
    r8mat_print(m, n, a, '  BIW matrix:')

    print ''
    print 'BIW_TEST'
    print '  Normal end of execution.'

    return
def cheby_van2_test ( ):

#*****************************************************************************80
#
## CHEBY_VAN2_TEST tests CHEBY_VAN2.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    22 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'CHEBY_VAN2_TEST'
  print '  CHEBY_VAN2 computes the CHEBY_VAN2 matrix.'

  m = 5
  n = 5
  a = cheby_van2 ( n )
  r8mat_print ( m, n, a, '  CHEBY_VAN2 matrix:' )

  print ''
  print 'CHEBY_VAN2_TEST'
  print '  Normal end of execution.'

  return
Beispiel #52
0
def hankel_n_test():

    #*****************************************************************************80
    #
    ## HANKEL_N_TEST tests HANKEL_N.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    11 January 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'HANKEL_N_TEST'
    print '  HANKEL_N computes the HANKEL_N matrix.'

    m = 5
    n = m
    a = hankel_n(n)
    r8mat_print(m, n, a, '  HANKEL_N matrix:')

    print ''
    print 'HANKEL_N_TEST'
    print '  Normal end of execution.'

    return
def r8mat_indicator_test ( ):

#*****************************************************************************80
#
## R8MAT_INDICATOR_TEST tests R8MAT_INDICATOR.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    03 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'R8MAT_INDICATOR_TEST'
  print '  R8MAT_INDICATOR creates an "indicator" R8MAT.'

  m = 5
  n = 4
  a = r8mat_indicator ( m, n )
  r8mat_print ( m, n, a, '  The indicator matrix:' )

  print ''
  print 'R8MAT_INDICATOR_TEST'
  print '  Normal end of execution.'

  return
Beispiel #54
0
def summation_test ( ):

#*****************************************************************************80
#
## SUMMATION_TEST tests SUMMATION.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    17 December 2014
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'SUMMATION_TEST'
  print '  SUMMATION computes the SUMMATION matrix.'

  m = 5
  n = 4
  a = summation ( m, n )
  r8mat_print ( m, n, a, '  SUMMATION matrix:' )

  print ''
  print 'SUMMATION_TEST'
  print '  Normal end of execution.'

  return
Beispiel #55
0
def sweet1_test ( ):

#*****************************************************************************80
#
## SWEET1_TEST tests SWEET1.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    24 February 2015
#
#  Author:
#
#    John Burkardt
#
  from r8mat_print import r8mat_print

  print ''
  print 'SWEET1_TEST'
  print '  SWEET1 computes the SWEET1 matrix.'

  n = 6
  a = sweet1 ( )
  r8mat_print ( n, n, a, '  SWEET1 matrix:' )

  print ''
  print 'SWEET1_TEST'
  print '  Normal end of execution.'

  return
Beispiel #56
0
def ring_adj_test():

    #*****************************************************************************80
    #
    ## RING_ADJ_TEST tests RING_ADJ.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    12 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from r8mat_print import r8mat_print

    print ''
    print 'RING_ADJ_TEST'
    print '  RING_ADJ computes the RING_ADJ matrix.'

    m = 6
    n = m

    a = ring_adj(m, n)
    r8mat_print(m, n, a, '  RING_ADJ matrix:')

    print ''
    print 'RING_ADJ_TEST'
    print '  Normal end of execution.'

    return