Beispiel #1
0
def ytb_next_test():

    # *****************************************************************************80
    #
    ## YTB_NEXT_TEST tests YTB_NEXT.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    29 May 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    import numpy as np
    from ytb_print import ytb_print

    print ""
    print "YTB_NEXT_TEST"
    print "  YTB_NEXT generates Young tableaus."

    n = 6
    lam = np.array([3, 2, 1, 0, 0, 0])
    a = np.zeros(n)
    more = False

    while True:

        lam, a, more = ytb_next(n, lam, a, more)

        ytb_print(n, a, "")

        if not more:
            break
    #
    #  Terminate.
    #
    print ""
    print "YTB_NEXT_TEST:"
    print "  Normal end of execution."

    return
Beispiel #2
0
def ytb_next_test ( ):

#*****************************************************************************80
#
## YTB_NEXT_TEST tests YTB_NEXT.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    29 May 2015
#
#  Author:
#
#    John Burkardt
#
  import numpy as np
  from ytb_print import ytb_print

  print ''
  print 'YTB_NEXT_TEST'
  print '  YTB_NEXT generates Young tableaus.'

  n = 6
  lam = np.array ( [ 3, 2, 1, 0, 0, 0 ] )
  a = np.zeros ( n )
  more = False
 
  while ( True ):
 
    lam, a, more = ytb_next ( n, lam, a, more )
 
    ytb_print ( n, a, '' )
 
    if ( not more ):
      break
#
#  Terminate.
#
  print ''
  print 'YTB_NEXT_TEST:'
  print '  Normal end of execution.'

  return
Beispiel #3
0
def ytb_random_test():

    #*****************************************************************************80
    #
    ## YTB_RANDOM_TEST tests YTB_RANDOM.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    08 May 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    import numpy as np
    from ytb_print import ytb_print

    print ''
    print 'YTB_RANDOM_TEST'
    print '  YTB_RANDOM generates a random Young tableau'

    n = 6
    lam = np.array([3, 2, 1, 0, 0, 0])
    seed = 123456789

    for i in range(0, 5):

        a, seed = ytb_random(n, lam, seed)
        ytb_print(n, a, '')


#
#  Terminate.
#
    print ''
    print 'YTB_RANDOM_TEST:'
    print '  Normal end of execution.'

    return
def ytb_random_test ( ):

#*****************************************************************************80
#
## YTB_RANDOM_TEST tests YTB_RANDOM.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    08 May 2015
#
#  Author:
#
#    John Burkardt
#
  import numpy as np
  from ytb_print import ytb_print

  print ''
  print 'YTB_RANDOM_TEST'
  print '  YTB_RANDOM generates a random Young tableau'

  n = 6
  lam = np.array ( [ 3, 2, 1, 0, 0, 0 ] )
  seed = 123456789

  for i in range ( 0, 5 ):
 
    a, seed = ytb_random ( n, lam, seed )
    ytb_print ( n, a, '' )
#
#  Terminate.
#
  print ''
  print 'YTB_RANDOM_TEST:'
  print '  Normal end of execution.'

  return