"""This is a demontration file for sort_vectors.py.
"""

# Copyright (c) 2001 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


if __name__ == '__main__':
    import sort_vectors_mc

    all_vector = [ \
        ['http://www.crocus.com/aze.html', \
         {'crocus': 8.63, 'fleur':4.31, 'grenouille': 2.59}] ,\
        ['http://www.grenouille.com/meteo.html', \
         {'crocus': 8.74,  'fleur':4.85, 'grenouille': 0}] ,\
        ['http://www.meteo.fr/heute.html', \
         {'crocus': 7.68,  'fleur':5.48, 'az':3.29}] ,\
        ['http://www.blabla.fr', \
         {'crocus': 7.71,  'grenouille': 1.54,  'az':6.17}] ,\
        ['http://www.foo.fr', \
         {'crocus': 5.60,  'fleur':4.20, 'grenouille': 1.40,  'az':7.00}] ,\
        ['http://www.aquarium.fr', \
         {'crocus': 5.298,  'fleur':2.649, 'grenouille': 1.324,  'az':7.947}] \
       ]
    
    svs = sort_vectors_mc.sort_vectors_mc(all_vector, 3, debug=1)
    the_tree = svs.do()
    print '\n', the_tree
    for i in range(len(all_vector)):
        print i, ' : ', all_vector[i][0]
