Java Number Convert to numberToMinterm(int num, int length, int index, boolean[] output)

Here you can find the source of numberToMinterm(int num, int length, int index, boolean[] output)

Description

encode the number as a boolean vector, starting from the given index.

License

Open Source License

Declaration

public static void numberToMinterm(int num, int length, int index,
        boolean[] output) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from w  w w.j  a  v  a  2  s .  c o m*/
     * encode the number as a boolean vector, starting from the given index.
     * must use the same encoding as numberToBDD!
     *
     * @see #numberToBDD
     */
    public static void numberToMinterm(int num, int length, int index,
            boolean[] output) {
        for (int i = 0; i < length; i++)
            output[index++] = ((num & (1L << i)) != 0);
    }
}

Related

  1. NumberToCharacter(final Number value)
  2. numberToFormattedString(Double d)
  3. numberToJson(Number number)
  4. numberToOrdinal(int i)
  5. numberToPaddedHexString(int number, int size)
  6. numberToPrimitiveLong(Object o)
  7. NumberToReal(Object n)