Examples of Permutation


Examples of bnGUI.venn.geometry.Permutation

        });
   
    for(int i=0; i<objects.length; ++i )
      System.out.print(objects[i]+" ");
    System.out.println("");
    Permutation perm = new Permutation(order);
    System.out.println("order  = "+perm);
    System.out.println("iorder = "+perm.createInverse());
    for(int i=0; i<order.length; ++i )
      System.out.print(objects[perm.invMap(i)]+" ");
  }
View Full Code Here

Examples of cc.redberry.core.combinatorics.Permutation

        else
            ArraysUtils.insertionSort(types, sortPermutation);

        final int size = data.size();

        Permutation sort = new Permutation(sortPermutation);

        final Symmetry[] resulting = new Symmetry[symmetries.size() - 1];
        int i, j;
        int[] permutation;
        IntArrayList current;
        //0th is identity identity
        for (i = 1; i < resulting.length + 1; ++i) {
            current = symmetries.get(i).list;
            permutation = new int[size];
            for (j = 0; j < size; ++j)
                permutation[j] = sort.inverse().newIndexOf(current.get(sort.newIndexOf(j)));
            resulting[i - 1] = new Symmetry(permutation, symmetries.get(i).sign);
        }
        SimpleIndices simpleIndices = IndicesFactory.createSimple(indices);
        simpleIndices.getSymmetries().addAllUnsafe(resulting);
        return simpleIndices;
View Full Code Here

Examples of cc.redberry.core.groups.permutations.Permutation

            currentBuffer = null;
            return r;
        }

        if (searchForPermutations != null) {
            Permutation permutation;
            out:
            while (searchForPermutations.hasNext()) {
                permutation = searchForPermutations.next();
                IndexMappingBuffer tempBuffer = currentBuffer.clone();
                for (int i = 0; i < size; ++i)
                    if (!tempBuffer.tryMap(fromIndices.get(i), toIndices.get(permutation.newIndexOf(i))))
                        continue out;
                tempBuffer.addSign(permutation.antisymmetry());
                return tempBuffer;
            }
            searchForPermutations = null;
            return currentBuffer = null;
        }
View Full Code Here

Examples of cc.redberry.core.groups.permutations.Permutation

            Map<Permutation, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
            MappingsPort port = IndexMappings.createPort(temp, temp);
            Mapping mapping;
            Permutation sym;

            //check for two symmetric indices of product contracted with two antisymmetric indices of eps
            while ((mapping = port.take()) != null) {
                //symmetry of product indices
                sym = TensorUtils.getSymmetryFromMapping(indices, mapping);
                //if symmetry mixes indices of product, which are not contracted with eps
                if (!checkNonPermutingPositions(sym, nonPermutableArray))
                    continue;
                //bingo!
                if (sym.antisymmetry() != symmetries.get(sym))
                    return Complex.ZERO;
            }

        }
View Full Code Here

Examples of com.google.gwt.dev.Permutation

    return jsStrongName;
  }

  @Override
  public Permutation getPermutation() {
    return new Permutation(0, new BindingProps(new BindingProperty[0], new String[0],
        ConfigProps.EMPTY));
  }
View Full Code Here

Examples of infovis.utils.Permutation

                    key,
                    tree.getColumn(value));
            }
            final Column order = visualization.getVisualColumn("sort");
            final Column size = visualization.getVisualColumn(Visualization.VISUAL_SIZE);
            Permutation perm = visualization.getPermutation();
            perm.sort(new RowComparator() {
                public int compare(int row1, int row2) {
                    if (tree.isLeaf(row1) && tree.isLeaf(row2)) {
                        return size.compare(row1, row2);
                    }
                    else {
View Full Code Here

Examples of ivory.lsh.data.Permutation

    if(fs.exists(new Path(randomPermFile))){
      sLogger.info("Random permutations output path already exists!");
      return randomPermFile;
    }
    SequenceFile.Writer writer = SequenceFile.createWriter(fs, job, new Path(randomPermFile), IntWritable.class, ArrayListOfIntsWritable.class);
    Permutation p = new PermutationByBit(numBits);
    for(int i=0;i<numOfPermutations;i++){
      ArrayListOfIntsWritable perm = p.nextPermutation();
      writer.append(new IntWritable(i), perm);
      sLogger.debug(i +":"+perm);
    }
    writer.close();
    sLogger.info("Random permutations written.");
View Full Code Here

Examples of ivory.lsh.data.Permutation

      }
    }
  }
 
  public static void main(String[] args){
    Permutation p = new PermutationByBlock(64);
    for(int i=0;i<10;i++){
      System.out.println(p.nextPermutation());
    }
  }
View Full Code Here

Examples of ivory.lsh.data.Permutation

    PwsimEnvironment.numOfPermutations = 0//doesn't matter. not used to compute signatures
   
    if(fs.exists(new Path(randomPermFile))){
      sLogger.info("Random permutations output path already exists!");
    }else{
      Permutation p = new PermutationByBit(vocabSize);
      Permutation.writeToFile(p, numInts, fs, job, randomPermFile)
    }
    DistributedCache.addCacheFile(new URI(randomPermFile), job);

    sLogger.info("Computing signatures...");
View Full Code Here

Examples of ivory.lsh.data.Permutation

      }
    }
  }

  public static void main(String[] args){
    Permutation p = new PermutationByBlock(64);
    for(int i=0;i<10;i++){
      System.out.println(p.nextPermutation());
    }
  }
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.