Package mephi.cybernetics.dhcn.common.data

Examples of mephi.cybernetics.dhcn.common.data.Vector


    @Override
    public IResultSolver execute(DataTask task)
    {
        System.out.println("SolverDataVectorMultNum");
        DataVectorMultNumTask currentTask = (DataVectorMultNumTask) task;
        Vector vector = currentTask.getVector();
        Double num = currentTask.getNum();
        DataTaskSolver tasks = new DataTaskSolver();
        for (int i = 0; i < vector.getCountElem(); i++)
        {
           DataNumMultNumTask newTask = new DataNumMultNumTask(vector.getVectorElem(i), num, -1, i, Config.NODE_SOLVER);
           tasks.addTask(newTask);
        }
        return tasks;
    }
View Full Code Here


   
    @Override
    public IResultSolver assembly(ResultPool pool)
    {
       System.out.println("CollectorDataVectorMultNum");
       Vector vector = new Vector();
       for (int i = 0; i < pool.getPoolSize(); i++)
       {
           DataNumMultNumResult result = (DataNumMultNumResult)pool.getElemPool(i);
           vector.addElemToVector(result.getNum());
       }
       DataVectorMultNumResult result = new DataVectorMultNumResult(vector, pool.getNumOfMessage(), pool.getTargetId());
       DataResultSolver resultSolfer = new DataResultSolver(result);
       return resultSolfer;
    }
View Full Code Here

    {
       
        System.out.println("Client start");

       
        Vector vector = new Vector();
        Matrix matrix = new Matrix();
        for (int i = 0; i < 3; i++)
        {
            vector = new Vector();
            for (int j = 0; j < 3; j++)
            {
                vector.addElemToVector(new Double(i + j));
            }
            matrix.addVectorToMatrix(vector);
        }
        matrix.show();
       
View Full Code Here

TOP

Related Classes of mephi.cybernetics.dhcn.common.data.Vector

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.