52 INLINE
static SparseArray range(
int low_bit,
int size);
54 INLINE
static bool has_max_num_bits();
55 INLINE
static int get_max_num_bits();
57 INLINE
int get_num_bits()
const;
58 INLINE
bool get_bit(
int index)
const;
59 INLINE
void set_bit(
int index);
60 INLINE
void clear_bit(
int index);
61 INLINE
void set_bit_to(
int index,
bool value);
62 INLINE
bool get_highest_bits()
const;
63 INLINE
bool is_zero()
const;
64 INLINE
bool is_all_on()
const;
66 INLINE
bool has_any_of(
int low_bit,
int size)
const;
67 INLINE
bool has_all_of(
int low_bit,
int size)
const;
68 INLINE
void set_range(
int low_bit,
int size);
69 INLINE
void clear_range(
int low_bit,
int size);
70 INLINE
void set_range_to(
bool value,
int low_bit,
int size);
72 int get_num_on_bits()
const;
73 int get_num_off_bits()
const;
75 int get_lowest_off_bit()
const;
77 int get_highest_off_bit()
const;
78 int get_next_higher_different_bit(
int low_bit)
const;
80 INLINE
void invert_in_place();
81 bool has_bits_in_common(
const SparseArray &other)
const;
84 void output(std::ostream &out)
const;
86 INLINE
bool operator == (
const SparseArray &other)
const;
87 INLINE
bool operator != (
const SparseArray &other)
const;
88 INLINE
bool operator < (
const SparseArray &other)
const;
104 operator << (
int shift)
const;
107 operator >> (
int shift)
const;
112 INLINE
void operator <<= (
int shift);
113 INLINE
void operator >>= (
int shift);
115 INLINE
bool is_inverse()
const;
116 INLINE
size_t get_num_subranges()
const;
117 INLINE
int get_subrange_begin(
size_t n)
const;
118 INLINE
int get_subrange_end(
size_t n)
const;
120 EXTENSION(PyObject *__getstate__()
const);
121 EXTENSION(
void __setstate__(PyObject *state));
124 void do_add_range(
int begin,
int end);
125 void do_remove_range(
int begin,
int end);
126 bool do_has_any(
int begin,
int end)
const;
127 bool do_has_all(
int begin,
int end)
const;
131 void do_intersection_neg(
const SparseArray &other);
132 void do_shift(
int offset);
137 INLINE Subrange(
int begin,
int end);
138 INLINE
bool operator < (
const Subrange &other)
const;
157 static void init_type() {
167 INLINE std::ostream &
168 operator << (std::ostream &out,
const SparseArray &array) {
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A dynamic array with an unlimited number of bits.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
The default class template does not define any methods.
This class records a set of integers, where each integer is either present or not present in the set.
TypeHandle is the identifier used to differentiate C++ class types.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_highest_on_bit(unsigned short x)
Returns the index of the highest 1 bit in the word.
int get_lowest_on_bit(unsigned short x)
Returns the index of the lowest 1 bit in the word.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.