def fourier_cosine_test():

    #*****************************************************************************80
    #
    ## FOURIER_COSINE_TEST tests FOURIER_COSINE.
    #
    #  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_COSINE_TEST'
    print '  FOURIER_COSINE computes the FOURIER_COSINE matrix.'

    m = 5
    n = m

    a = fourier_cosine(n)
    r8mat_print(m, n, a, '  FOURIER_COSINE matrix:')

    print ''
    print 'FOURIER_COSINE_TEST'
    print '  Normal end of execution.'

    return
def fourier_cosine_inverse(n):

    #*****************************************************************************80
    #
    ## FOURIER_COSINE_INVERSE returns the inverse of the FOURIER_COSINE matrix.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    #  Parameters:
    #
    #    Input, integer N, the order of A.
    #
    #    Output, real A(N,N), the matrix.
    #
    import numpy as np

    a = fourier_cosine(n)

    a = np.transpose(a)

    return a
def fourier_cosine_test ( ):

#*****************************************************************************80
#
## FOURIER_COSINE_TEST tests FOURIER_COSINE.
#
#  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_COSINE_TEST'
  print '  FOURIER_COSINE computes the FOURIER_COSINE matrix.'

  m = 5
  n = m

  a = fourier_cosine ( n )
  r8mat_print ( m, n, a, '  FOURIER_COSINE matrix:' )

  print ''
  print 'FOURIER_COSINE_TEST'
  print '  Normal end of execution.'

  return
def fourier_cosine_inverse ( n ):

#*****************************************************************************80
#
## FOURIER_COSINE_INVERSE returns the inverse of the FOURIER_COSINE matrix.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    26 March 2015
#
#  Author:
#
#    John Burkardt
#
#  Parameters:
#
#    Input, integer N, the order of A.
#
#    Output, real A(N,N), the matrix.
#
  import numpy as np

  a = fourier_cosine ( n )

  a = np.transpose ( a )

  return a
def fourier_cosine_determinant_test():

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

    print ''
    print 'FOURIER_COSINE_DETERMINANT_TEST'
    print '  FOURIER_COSINE_DETERMINANT computes the determinant of the FOURIER_COSINE matrix.'
    print ''

    m = 5
    n = m

    a = fourier_cosine(n)
    r8mat_print(m, n, a, '  FOURIER_COSINE matrix:')

    value = fourier_cosine_determinant(n)

    print ''
    print '  Value =  %g' % (value)

    print ''
    print 'FOURIER_COSINE_DETERMINANT_TEST'
    print '  Normal end of execution.'

    return
def fourier_cosine_determinant_test ( ):

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

  print ''
  print 'FOURIER_COSINE_DETERMINANT_TEST'
  print '  FOURIER_COSINE_DETERMINANT computes the determinant of the FOURIER_COSINE matrix.'
  print ''

  m = 5
  n = m

  a = fourier_cosine ( n )
  r8mat_print ( m, n, a, '  FOURIER_COSINE matrix:' )

  value = fourier_cosine_determinant ( n )

  print ''
  print '  Value =  %g' % ( value )

  print ''
  print 'FOURIER_COSINE_DETERMINANT_TEST'
  print '  Normal end of execution.'

  return