Package Database

Examples of Database.Users


        }

        @Override
        public void map(Object key, Text chunkURI, Context context) throws IOException, InterruptedException {

            Users otherUsers = new Users();
            Songs otherSongs = new Songs();
            KDDParser parser = new KDDParser(chunkURI.toString(), context.getConfiguration());
            parser.parse(otherSongs, otherUsers);


            //forall items i  //ith iteration
            for (Song i : mySongs) {

                //    forall items j  //split this into N parts
                for (Song j : otherSongs) {
                    double numerator = 0, denominator_left = 0, denominator_right = 0;

                    if (j.equals(i)) {
                        continue;
                    }

                    //        forall users user
                    int userCount = 0;
                    for (User user : myUsers) {
                        double num = 0, den_l = 0, den_r = 0;
//                        System.out.println("comparing! song: " + i.getID() + " and " + j.getID());
                        User other = otherUsers.getUser(user.getID());
                        if (other == null) {
                            continue;
                        }
                        if (user.rated(i) && other.rated(j)) {
//                            System.out.println("if (user.rated(i) && user.rated(j))! song: " + i.getID() + " and " + j.getID());
View Full Code Here

TOP

Related Classes of Database.Users

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.