static string ToString(BitVect vector) { var sb = new StringBuilder(); var n = vector.size(); for (uint i = 0; i < n; i++) sb.Append(vector.getBit(i) ? '1' : '0'); return sb.ToString(); }
public static string ToExcelString(BitVect fp) { var sb = new StringBuilder(); var n = fp.getNumBits(); for (int i = 0; i < n; i++) { sb.Append(fp.GetBit(i) ? "1" : "0"); } return(sb.ToString()); }
public static void GetOnBits(this BitVect bv, Int_Vect v) => bv.getOnBits(v);
public static int GetNumOnBits(this BitVect bv) => (int)bv.getNumOnBits();
public static bool UnsetBit(this BitVect bv, int which) => bv.unsetBit((uint)which);
public static bool GetBit(this BitVect bv, int which) => bv.getBit((uint)which);
public static void ClearBits(this BitVect bv) => bv.clearBits();
public static int Count(this BitVect bv) => (int)bv.size();