Package cern.colt.matrix

Examples of cern.colt.matrix.DoubleMatrix2D.columns()


    double score_CC=1./2,score_BB=(2+score_CC*k)/4, score_AA=(1+k*score_BB)/2;
    {
      GDLearnerGraph ndGraph = new GDLearnerGraph(gr,LearnerGraphND.ignoreNone, false);
      LSolver solver = ndGraph.buildMatrix(threadNumber);
      DoubleMatrix2D Ax=solver.toDoubleMatrix2D();
      Assert.assertEquals(6,Ax.columns());
    }
    Set<PairScore> pairsSet = addAllPermutations(gr.pairscores.chooseStatePairs(PAIR_INCOMPATIBLE*2,10,threadNumber,null,filter, new NonRandomRandom()));
    Set<PairScore> exp = addAllPermutations(Arrays.asList(new PairScore[]{
        new PairScore(gr.findVertex("A"),gr.findVertex("A"),(int)(10*score_AA),1),
        new PairScore(gr.findVertex("A"),gr.findVertex("B"),10*PAIR_INCOMPATIBLE,1),
 
View Full Code Here


      int indexRow = findIndexOf(incompatiblePairs, row);
      assert indexRow >= 0;
      PairScore pairRow = getPairScore(indexRow, 0,0);
     
      boolean firstValue = true;
      for(int column = 0;column < matrix.columns();++column)
      {
        double value = matrix.getQuick(row, column);
        if (value != 0) // this is not a computed value, hence it is reasonable to compare this double to zero in this way.
        {
          int indexColumn = findIndexOf(incompatiblePairs, column);
View Full Code Here

      int indexRow = findIndexOf(incompatiblePairs, row);
      assert indexRow >= 0;
      PairScore pairRow = getPairScore(indexRow, 0,0);
     
      boolean firstValue = true;
      for(int column = 0;column < matrix.columns();++column)
      {
        double value = matrix.getQuick(row, column);
        if (value != 0) // this is not a computed value, hence it is reasonable to compare this double to zero in this way.
        {
          int indexColumn = findIndexOf(incompatiblePairs, column);
View Full Code Here

    double score_CC=1./2,score_BB=(2+score_CC*k)/4, score_AA=(1+k*score_BB)/2;
    {
      GDLearnerGraph ndGraph = new GDLearnerGraph(gr,LearnerGraphND.ignoreNone, false);
      LSolver solver = ndGraph.buildMatrix(ThreadNumber);
      DoubleMatrix2D Ax=solver.toDoubleMatrix2D();
      Assert.assertEquals(6,Ax.columns());
    }
    Set<PairScore> pairsSet = addAllPermutations(gr.pairscores.chooseStatePairs(PAIR_INCOMPATIBLE*2,10,ThreadNumber,null,filter, new NonRandomRandom()));
    Set<PairScore> exp = addAllPermutations(Arrays.asList(new PairScore[]{
        new PairScore(gr.findVertex("A"),gr.findVertex("A"),(int)(10*score_AA),1),
        new PairScore(gr.findVertex("A"),gr.findVertex("B"),10*PAIR_INCOMPATIBLE,1),
 
View Full Code Here

    double score_CC=1./2,score_BB=(2+score_CC*k)/4, score_AA=(1+k*score_BB)/2;
    {
      GDLearnerGraph ndGraph = new GDLearnerGraph(gr,LearnerGraphND.ignoreNone, false);
      LSolver solver = ndGraph.buildMatrix(ThreadNumber);
      DoubleMatrix2D Ax=solver.toDoubleMatrix2D();
      Assert.assertEquals(6,Ax.columns());
    }
    Set<PairScore> pairsSet = addAllPermutations(gr.pairscores.chooseStatePairs(PAIR_INCOMPATIBLE*2,10,ThreadNumber,null,filter));
    Set<PairScore> exp = addAllPermutations(Arrays.asList(new PairScore[]{
        new PairScore(gr.findVertex("A"),gr.findVertex("A"),(int)(10*score_AA),1),
        new PairScore(gr.findVertex("A"),gr.findVertex("B"),10*PAIR_INCOMPATIBLE,1),
 
View Full Code Here

      int indexRow = findIndexOf(incompatiblePairs, row);
      assert indexRow >= 0;
      PairScore pairRow = getPairScore(indexRow, 0,0);
     
      boolean firstValue = true;
      for(int column = 0;column < matrix.columns();++column)
      {
        double value = matrix.getQuick(row, column);
        if (value != 0) // this is not a computed value, hence it is reasonable to compare this double to zero in this way.
        {
          int indexColumn = findIndexOf(incompatiblePairs, column);
View Full Code Here

    double score_CC=1./2,score_BB=(2+score_CC*k)/4, score_AA=(1+k*score_BB)/2;
    {
      GDLearnerGraph ndGraph = new GDLearnerGraph(gr,LearnerGraphND.ignoreNone, false);
      LSolver solver = ndGraph.buildMatrix(threadNumber);
      DoubleMatrix2D Ax=solver.toDoubleMatrix2D();
      Assert.assertEquals(6,Ax.columns());
    }
    Set<PairScore> pairsSet = addAllPermutations(gr.pairscores.chooseStatePairs(PAIR_INCOMPATIBLE*2,10,threadNumber,null,filter, new NonRandomRandom()));
    Set<PairScore> exp = addAllPermutations(Arrays.asList(new PairScore[]{
        new PairScore(gr.findVertex("A"),gr.findVertex("A"),(int)(10*score_AA),1),
        new PairScore(gr.findVertex("A"),gr.findVertex("B"),10*PAIR_INCOMPATIBLE,1),
 
View Full Code Here

      int indexRow = findIndexOf(incompatiblePairs, row);
      assert indexRow >= 0;
      PairScore pairRow = getPairScore(indexRow, 0,0);
     
      boolean firstValue = true;
      for(int column = 0;column < matrix.columns();++column)
      {
        double value = matrix.getQuick(row, column);
        if (value != 0) // this is not a computed value, hence it is reasonable to compare this double to zero in this way.
        {
          int indexColumn = findIndexOf(incompatiblePairs, column);
View Full Code Here

      BufferedWriter writer =
        new BufferedWriter(new FileWriter(filename));
      DoubleMatrix2D matrix = GraphMatrixOperations.<V,E>graphToSparseMatrix(graph,
          mWeightKey);
      for (int i=0;i<matrix.rows();i++) {
        for (int j=0;j<matrix.columns();j++) {
          writer.write(String.format("%4.2f ", matrix.getQuick(i,j)));
        }
        writer.write("\n");
      }
      writer.close();
View Full Code Here

    {
        DoubleMatrix2D temp = GraphMatrixOperations.graphToSparseMatrix(G,
                edgeWeights);
        for (int i = 0; i < temp.rows(); i++)
        {
            for (int j = 0; j < temp.columns(); j++)
            {
                double value = -1 * temp.get(i, j)
                        + stationaryDistribution.get(j);
                if (i == j)
                    value += 1;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.