Mercurial > repos > deepakjadmin > mayatool3_test3
comparison mayachemtools/docs/modules/man3/BitVector.3 @ 0:73ae111cf86f draft
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 11:55:01 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:73ae111cf86f |
---|---|
1 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) | |
2 .\" | |
3 .\" Standard preamble: | |
4 .\" ======================================================================== | |
5 .de Sp \" Vertical space (when we can't use .PP) | |
6 .if t .sp .5v | |
7 .if n .sp | |
8 .. | |
9 .de Vb \" Begin verbatim text | |
10 .ft CW | |
11 .nf | |
12 .ne \\$1 | |
13 .. | |
14 .de Ve \" End verbatim text | |
15 .ft R | |
16 .fi | |
17 .. | |
18 .\" Set up some character translations and predefined strings. \*(-- will | |
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will | |
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and | |
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, | |
23 .\" nothing in troff, for use with C<>. | |
24 .tr \(*W- | |
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
26 .ie n \{\ | |
27 . ds -- \(*W- | |
28 . ds PI pi | |
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
31 . ds L" "" | |
32 . ds R" "" | |
33 . ds C` "" | |
34 . ds C' "" | |
35 'br\} | |
36 .el\{\ | |
37 . ds -- \|\(em\| | |
38 . ds PI \(*p | |
39 . ds L" `` | |
40 . ds R" '' | |
41 'br\} | |
42 .\" | |
43 .\" Escape single quotes in literal strings from groff's Unicode transform. | |
44 .ie \n(.g .ds Aq \(aq | |
45 .el .ds Aq ' | |
46 .\" | |
47 .\" If the F register is turned on, we'll generate index entries on stderr for | |
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index | |
49 .\" entries marked with X<> in POD. Of course, you'll have to process the | |
50 .\" output yourself in some meaningful fashion. | |
51 .ie \nF \{\ | |
52 . de IX | |
53 . tm Index:\\$1\t\\n%\t"\\$2" | |
54 .. | |
55 . nr % 0 | |
56 . rr F | |
57 .\} | |
58 .el \{\ | |
59 . de IX | |
60 .. | |
61 .\} | |
62 .\" | |
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
64 .\" Fear. Run. Save yourself. No user-serviceable parts. | |
65 . \" fudge factors for nroff and troff | |
66 .if n \{\ | |
67 . ds #H 0 | |
68 . ds #V .8m | |
69 . ds #F .3m | |
70 . ds #[ \f1 | |
71 . ds #] \fP | |
72 .\} | |
73 .if t \{\ | |
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
75 . ds #V .6m | |
76 . ds #F 0 | |
77 . ds #[ \& | |
78 . ds #] \& | |
79 .\} | |
80 . \" simple accents for nroff and troff | |
81 .if n \{\ | |
82 . ds ' \& | |
83 . ds ` \& | |
84 . ds ^ \& | |
85 . ds , \& | |
86 . ds ~ ~ | |
87 . ds / | |
88 .\} | |
89 .if t \{\ | |
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
96 .\} | |
97 . \" troff and (daisy-wheel) nroff accents | |
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
105 .ds ae a\h'-(\w'a'u*4/10)'e | |
106 .ds Ae A\h'-(\w'A'u*4/10)'E | |
107 . \" corrections for vroff | |
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
110 . \" for low resolution devices (crt and lpr) | |
111 .if \n(.H>23 .if \n(.V>19 \ | |
112 \{\ | |
113 . ds : e | |
114 . ds 8 ss | |
115 . ds o a | |
116 . ds d- d\h'-1'\(ga | |
117 . ds D- D\h'-1'\(hy | |
118 . ds th \o'bp' | |
119 . ds Th \o'LP' | |
120 . ds ae ae | |
121 . ds Ae AE | |
122 .\} | |
123 .rm #[ #] #H #V #F C | |
124 .\" ======================================================================== | |
125 .\" | |
126 .IX Title "BITVECTOR 1" | |
127 .TH BITVECTOR 1 "2015-03-29" "perl v5.14.2" "MayaChemTools" | |
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
129 .\" way too many mistakes in technical documents. | |
130 .if n .ad l | |
131 .nh | |
132 .SH "NAME" | |
133 BitVector | |
134 .SH "SYNOPSIS" | |
135 .IX Header "SYNOPSIS" | |
136 use BitVector; | |
137 .PP | |
138 use BitVector (); | |
139 .PP | |
140 use BitVector qw(:all); | |
141 .SH "DESCRIPTION" | |
142 .IX Header "DESCRIPTION" | |
143 \&\fBBitVector\fR class provides the following methods: | |
144 .PP | |
145 new, ClearAllBits, ClearBit, ClearBits, ClearBitsRange, Copy, FlipAllBits, | |
146 FlipBit, FlipBits, FlipBitsRange, GetBit, GetBitsAsBinaryString, | |
147 GetBitsAsDecimalString, GetBitsAsHexadecimalString, GetBitsAsOctalString, | |
148 GetBitsAsRawBinaryString, GetDensityOfClearBits, GetDensityOfSetBits, | |
149 GetNumOfClearBits, GetNumOfSetBits, GetSize, IsBitClear, IsBitSet, IsBitVector, | |
150 NewFromBinaryString, NewFromDecimalString, NewFromHexadecimalString, | |
151 NewFromOctalString, NewFromRawBinaryString, Reverse, SetAllBits, SetBit, | |
152 SetBitValue, SetBitValueBitOrder, SetBitValuePrintFormat, SetBits, | |
153 SetBitsAsBinaryString, SetBitsAsDecimalString, SetBitsAsHexadecimalString, | |
154 SetBitsAsOctalString, SetBitsAsRawBinaryString, SetBitsRange, StringifyBitVector | |
155 .PP | |
156 The following methods can also be used as functions: | |
157 .PP | |
158 IsBitVector, NewFromBinaryString, NewFromDecimalString, NewFromHexadecimalString, | |
159 NewFromOctalString, NewFromRawBinaryString | |
160 .PP | |
161 The following operators are overloaded: | |
162 .PP | |
163 .Vb 1 | |
164 \& "" & | ^ ~ == != | |
165 .Ve | |
166 .PP | |
167 Internally, bits are stored in ascending order using Perl vec function. Regardless | |
168 of machine order, big-endian or little-endian, vec function always considers first | |
169 string byte as the lowest byte and first bit within each byte as the lowest bit. | |
170 .PP | |
171 Things to keep in mind: | |
172 .PP | |
173 .Vb 5 | |
174 \& o Bit numbers range from 0 to (Size \- 1). | |
175 \& o Bit data retieval methods provide options to data in ascending or | |
176 \& descending bit order. Default is ascending bit order. | |
177 \& o Stringyfy method provides an option to print data in ascending or | |
178 \& descending bit order. Default is ascending bit order. | |
179 .Ve | |
180 .SS "\s-1METHODS\s0" | |
181 .IX Subsection "METHODS" | |
182 .IP "\fBnew\fR" 4 | |
183 .IX Item "new" | |
184 .Vb 1 | |
185 \& $NewBitVector = new BitVector($Size); | |
186 .Ve | |
187 .Sp | |
188 Create a new \fIBitVector\fR object of size \fISize\fR and return newly created | |
189 \&\fBBitVector\fR. Bit numbers range from 0 to 1 less than \fISize\fR. | |
190 .IP "\fBClearAllBits\fR" 4 | |
191 .IX Item "ClearAllBits" | |
192 .Vb 1 | |
193 \& $BitVector\->ClearAllBits(); | |
194 .Ve | |
195 .Sp | |
196 Set all bit values to 0 in \fIBitVector\fR object and return \fIBitVector\fR. | |
197 .IP "\fBClearBit\fR" 4 | |
198 .IX Item "ClearBit" | |
199 .Vb 1 | |
200 \& $BitVector\->ClearBit($BitNum); | |
201 .Ve | |
202 .Sp | |
203 Set specified bit number \fIBitNum\fR to 0 in \fIBitVector\fR object and return \fIBitVector\fR. | |
204 .IP "\fBClearBits\fR" 4 | |
205 .IX Item "ClearBits" | |
206 .Vb 1 | |
207 \& $BitVector\->ClearBits(@BitNums); | |
208 .Ve | |
209 .Sp | |
210 Set specified bit numbers \fIBitNums\fR to 0 in \fIBitVector\fR object and return \fIBitVector\fR. | |
211 .IP "\fBClearBitsRange\fR" 4 | |
212 .IX Item "ClearBitsRange" | |
213 .Vb 1 | |
214 \& $BitVector\->ClearBitsRange($MinBitNum, $MaxBitNum); | |
215 .Ve | |
216 .Sp | |
217 Set specified bit numbers between \fIMinBitNum\fR and \fIMaxBitNum\fR to 0 in \fIBitVector\fR | |
218 object and return \fIBitVector\fR. | |
219 .IP "\fBCopy\fR" 4 | |
220 .IX Item "Copy" | |
221 .Vb 1 | |
222 \& $NewBitVector = $BitVector\->Copy(); | |
223 .Ve | |
224 .Sp | |
225 Copy \fIBitVector\fR and its associated data to a new \fBBitVector\fR and return a new | |
226 \&\fBBitVector\fR. | |
227 .IP "\fBFlipAllBits\fR" 4 | |
228 .IX Item "FlipAllBits" | |
229 .Vb 1 | |
230 \& $BitVector\->FlipAllBits(); | |
231 .Ve | |
232 .Sp | |
233 Flip values of all bits in \fIBitVector\fR and its associated data to a new \fBBitVector\fR and return | |
234 \&\fIBitVector\fR. | |
235 .IP "\fBFlipBit\fR" 4 | |
236 .IX Item "FlipBit" | |
237 .Vb 1 | |
238 \& $BitVector\->FlipBit($BitNum); | |
239 .Ve | |
240 .Sp | |
241 Flip value of specified \fIBitNum\fR of in \fIBitVector\fR and return \fIBitVector\fR. | |
242 .IP "\fBFlipBits\fR" 4 | |
243 .IX Item "FlipBits" | |
244 .Vb 1 | |
245 \& $BitVector\->FlipBits(@BitNums); | |
246 .Ve | |
247 .Sp | |
248 Flip values of specified bit numbers \fIBitNums\fR in \fIBitVector\fR object and return \fIBitVector\fR. | |
249 .IP "\fBFlipBitsRange\fR" 4 | |
250 .IX Item "FlipBitsRange" | |
251 .Vb 1 | |
252 \& $BitVector\->FlipBitsRange($MinBitNum, $MaxBitNum); | |
253 .Ve | |
254 .Sp | |
255 Flip values of specified bit numbers between \fIMinBitNum\fR and \fIMaxBitNum\fR in \fIBitVector\fR | |
256 object and return \fIBitVector\fR. | |
257 .IP "\fBGetBit\fR" 4 | |
258 .IX Item "GetBit" | |
259 .Vb 1 | |
260 \& $BitValue = $BitVector\->GetBit($BitNum); | |
261 .Ve | |
262 .Sp | |
263 Returns value of bit number \fIBitNum\fR in \fIBitVector\fR object. | |
264 .IP "\fBGetBitsAsBinaryString\fR" 4 | |
265 .IX Item "GetBitsAsBinaryString" | |
266 .Vb 1 | |
267 \& $BitString = $BitVector\->GetBitsAsBinaryString([$BitOrder]); | |
268 .Ve | |
269 .Sp | |
270 Returns values of bits in \fIBitVector\fR as an ascii bit string containing 0s and 1s. | |
271 .Sp | |
272 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
273 byte as the loweset bit as opposed to the higest bit. | |
274 .IP "\fBGetBitsAsDecimalString\fR" 4 | |
275 .IX Item "GetBitsAsDecimalString" | |
276 .Vb 1 | |
277 \& $BitString = $BitVector\->GetBitsAsDecimalString([$BitOrder]); | |
278 .Ve | |
279 .Sp | |
280 Returns values of bits in \fIBitVector\fR as a decimal bit string containing values from 0 to | |
281 9. | |
282 .Sp | |
283 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
284 byte as the loweset bit as opposed to the higest bit. | |
285 .IP "\fBGetBitsAsHexadecimalString\fR" 4 | |
286 .IX Item "GetBitsAsHexadecimalString" | |
287 .Vb 1 | |
288 \& $BitString = $BitVector\->GetBitsAsHexadecimalString([$BitOrder]); | |
289 .Ve | |
290 .Sp | |
291 Returns values of bits in \fIBitVector\fR as a hexadecimal bit string containing values from 0 to 9 | |
292 and a to f. | |
293 .Sp | |
294 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
295 byte as the loweset bit as opposed to the higest bit. | |
296 .IP "\fBGetBitsAsOctalString\fR" 4 | |
297 .IX Item "GetBitsAsOctalString" | |
298 .Vb 1 | |
299 \& $BitString = $BitVector\->GetBitsAsOctalString([$BitOrder]); | |
300 .Ve | |
301 .Sp | |
302 Returns values of bits in \fIBitVector\fR as an octal bit string containing values form 0 to | |
303 7. | |
304 .Sp | |
305 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
306 byte as the loweset bit as opposed to the higest bit. | |
307 .IP "\fBGetBitsAsRawBinaryString\fR" 4 | |
308 .IX Item "GetBitsAsRawBinaryString" | |
309 .Vb 1 | |
310 \& $BitString = $BitVector\->GetBitsAsRawBinaryString(); | |
311 .Ve | |
312 .Sp | |
313 Returns values of bits in \fIBitVector\fR as an string corresponding to packed bit values | |
314 used by Perl vec function without perfoming any unpacking. | |
315 .IP "\fBGetDensityOfClearBits\fR" 4 | |
316 .IX Item "GetDensityOfClearBits" | |
317 .Vb 1 | |
318 \& $ClearBitsDensity = $BitVector\->GetDensityOfClearBits(); | |
319 .Ve | |
320 .Sp | |
321 Returns density of clear bits in \fIBitVector\fR which corresponds to number of bits set to 0 | |
322 \&\fIBitVector\fR divided by its size. | |
323 .IP "\fBGetDensityOfSetBits\fR" 4 | |
324 .IX Item "GetDensityOfSetBits" | |
325 .Vb 1 | |
326 \& $SetBitsDensity = $BitVector\->GetDensityOfSetBits(); | |
327 .Ve | |
328 .Sp | |
329 Returns density of set bits in \fIBitVector\fR which corresponds to number of bits set to 1 in | |
330 \&\fIBitVector\fR divided by its size. | |
331 .IP "\fBGetNumOfClearBits\fR" 4 | |
332 .IX Item "GetNumOfClearBits" | |
333 .Vb 1 | |
334 \& $NumOfClearBits = $BitVector\->GetNumOfClearBits(); | |
335 .Ve | |
336 .Sp | |
337 Returns number of bits set to 0 in \fIBitVector\fR. | |
338 .IP "\fBGetNumOfSetBits\fR" 4 | |
339 .IX Item "GetNumOfSetBits" | |
340 .Vb 1 | |
341 \& $NumOfSetBits = $BitVector\->GetNumOfSetBits(); | |
342 .Ve | |
343 .Sp | |
344 Returns number of bits set to 1 in \fIBitVector\fR. | |
345 .IP "\fBGetSize\fR" 4 | |
346 .IX Item "GetSize" | |
347 .Vb 1 | |
348 \& $Size = $BitVector\->GetSize(); | |
349 .Ve | |
350 .Sp | |
351 Returns size of \fIBitVector\fR. | |
352 .IP "\fBIsBitClear\fR" 4 | |
353 .IX Item "IsBitClear" | |
354 .Vb 1 | |
355 \& $Status = $BitVector\->IsBitClear(); | |
356 .Ve | |
357 .Sp | |
358 Returns 1 or 0 based on whether \fIBitNum\fR is set to 0 in \fIBitVector\fR. | |
359 .IP "\fBIsBitSet\fR" 4 | |
360 .IX Item "IsBitSet" | |
361 .Vb 1 | |
362 \& $Status = $BitVector\->IsBitSet($BitNum); | |
363 .Ve | |
364 .Sp | |
365 Returns 1 or 0 based on whether \fIBitNum\fR is set to 1 in \fIBitVector\fR. | |
366 .IP "\fBIsBitVector\fR" 4 | |
367 .IX Item "IsBitVector" | |
368 .Vb 1 | |
369 \& $Status = BitVector::IsBitVector($Object); | |
370 .Ve | |
371 .Sp | |
372 Returns 1 or 0 based on whether \fIObject\fR is a \fBBitVector\fR object. | |
373 .IP "\fBNewFromBinaryString\fR" 4 | |
374 .IX Item "NewFromBinaryString" | |
375 .Vb 4 | |
376 \& $NewBitVector = BitVector::NewFromBinaryString($BinaryString, | |
377 \& [$BitOrder]); | |
378 \& $NewBitVector = $BitVector\->NewFromBinaryString($BinaryString, | |
379 \& [$BitOrder]); | |
380 .Ve | |
381 .Sp | |
382 Creates a new \fIBitVector\fR using \fIBinaryString\fR and returns new \fBBitVector\fR object. | |
383 .Sp | |
384 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
385 byte as the loweset bit as opposed to the higest bit. | |
386 .IP "\fBNewFromDecimalString\fR" 4 | |
387 .IX Item "NewFromDecimalString" | |
388 .Vb 4 | |
389 \& $NewBitVector = BitVector::NewFromDecimalString($DecimalString, | |
390 \& [$BitOrder]); | |
391 \& $NewBitVector = $BitVector\->NewFromDecimalString($DecimalString, | |
392 \& [$BitOrder]); | |
393 .Ve | |
394 .Sp | |
395 Creates a new \fIBitVector\fR using \fIDecimalString\fR and returns new \fBBitVector\fR object. | |
396 .Sp | |
397 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
398 byte as the loweset bit as opposed to the higest bit. | |
399 .IP "\fBNewFromHexadecimalString\fR" 4 | |
400 .IX Item "NewFromHexadecimalString" | |
401 .Vb 4 | |
402 \& $NewBitVector = BitVector::NewFromHexadecimalString( | |
403 \& $HexadecimalString, [$BitOrder]); | |
404 \& $NewBitVector = $BitVector\->NewFromHexadecimalString( | |
405 \& $HexadecimalString, [$BitOrder]); | |
406 .Ve | |
407 .Sp | |
408 Creates a new \fIBitVector\fR using \fIHexadecimalString\fR and returns new \fBBitVector\fR object. | |
409 .Sp | |
410 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
411 byte as the loweset bit as opposed to the higest bit. | |
412 .IP "\fBNewFromOctalString\fR" 4 | |
413 .IX Item "NewFromOctalString" | |
414 .Vb 2 | |
415 \& $NewBitVector = BitVector::NewFromOctalString($OctalString, [$BitOrder]); | |
416 \& $NewBitVector = $BitVector\->NewFromOctalString($OctalString, [$BitOrder]); | |
417 .Ve | |
418 .Sp | |
419 Creates a new \fIBitVector\fR using \fIOctalString\fR and returns new \fBBitVector\fR object. | |
420 .Sp | |
421 Default \fIBitOrder\fR is \fIAscending\fR bit order which corresponds to first bit in each | |
422 byte as the loweset bit as opposed to the higest bit. | |
423 .IP "\fBNewFromRawBinaryString\fR" 4 | |
424 .IX Item "NewFromRawBinaryString" | |
425 .Vb 4 | |
426 \& $NewBitVector = BitVector::NewFromRawBinaryString( | |
427 \& $RawBinaryString); | |
428 \& $NewBitVector = $BitVector\->NewFromRawBinaryString( | |
429 \& $RawBinaryString); | |
430 .Ve | |
431 .Sp | |
432 Creates a new \fIBitVector\fR using \fIRawBinaryString\fR and returns new \fBBitVector\fR object. | |
433 .IP "\fBReverse\fR" 4 | |
434 .IX Item "Reverse" | |
435 .Vb 1 | |
436 \& $BitVector\->Reverse(); | |
437 .Ve | |
438 .Sp | |
439 Reverses values of bits in \fIBitVector\fR and returns \fIBitVector\fR. First bit number ends up with | |
440 value of last bit number. | |
441 .IP "\fBSetAllBits\fR" 4 | |
442 .IX Item "SetAllBits" | |
443 .Vb 1 | |
444 \& $BitVector\->SetAllBits(); | |
445 .Ve | |
446 .Sp | |
447 Sets values of all bits in \fIBitVector\fR to 1 and returns \fIBitVector\fR. | |
448 .IP "\fBSetBit\fR" 4 | |
449 .IX Item "SetBit" | |
450 .Vb 1 | |
451 \& $BitVector\->SetBit($BitNum); | |
452 .Ve | |
453 .Sp | |
454 Sets value of \fIBitNum\fR to 1 in \fIBitVector\fR and returns \fIBitVector\fR. | |
455 .IP "\fBSetBitValue\fR" 4 | |
456 .IX Item "SetBitValue" | |
457 .Vb 1 | |
458 \& $BitVector\->SetBitValue($BitNum, $BitValue); | |
459 .Ve | |
460 .Sp | |
461 Sets value of \fIBitNum\fR to \fIBitValue\fR in \fIBitVector\fR and returns \fIBitVector\fR. | |
462 .IP "\fBSetBitValueBitOrder\fR" 4 | |
463 .IX Item "SetBitValueBitOrder" | |
464 .Vb 2 | |
465 \& BitVector::SetBitValueBitOrder($BitOrder); | |
466 \& $BitVector\->SetBitValueBitOrder($BitOrder); | |
467 .Ve | |
468 .Sp | |
469 Set bit order for printing \fBBitVector\fR values during stringification of \fBBitVector\fR object. | |
470 Possible bit order values: \fIAscending or Descending\fR. | |
471 .Sp | |
472 Bit order can be set for either an individual \fBBitVector\fR object or the class. Default is | |
473 to print bits in each byte in \fIAsscending\fR bit order. | |
474 .Sp | |
475 Internally, bits are stored in \fIAscending\fR bit order using Perl vec function. Regardless | |
476 of machine order, big-endian or little-endian, vec function always considers first | |
477 string byte as the lowest byte and first bit within each byte as the lowest bit. | |
478 .IP "\fBSetBitValuePrintFormat\fR" 4 | |
479 .IX Item "SetBitValuePrintFormat" | |
480 .Vb 2 | |
481 \& BitVector::SetBitValuePrintFormat($PrintValueFormat); | |
482 \& $BitVector\->SetBitValuePrintFormat($PrintValueFormat); | |
483 .Ve | |
484 .Sp | |
485 Set bit values print format for printing \fBBitVector\fR values during stringification of \fBBitVector\fR | |
486 object. Possible print format values: \fIBinary, Bin, Hexadecimal, Hex, Decimal, Dec, Octal, | |
487 Oct, RawBinary, RawBin\fR. Default: \fIBinary\fR. | |
488 .Sp | |
489 Bit values print format can be set for either an individual \fBBitVector\fR object or the class. | |
490 .IP "\fBSetBits\fR" 4 | |
491 .IX Item "SetBits" | |
492 .Vb 1 | |
493 \& $BitVector\->SetBits(@BitNums); | |
494 .Ve | |
495 .Sp | |
496 Set specified bit numbers \fIBitNums\fR to 1 in \fIBitVector\fR object and return \fIBitVector\fR. | |
497 .IP "\fBSetBitsAsBinaryString\fR" 4 | |
498 .IX Item "SetBitsAsBinaryString" | |
499 .Vb 1 | |
500 \& $BitVector\->SetBitsAsBinaryString($BinaryString); | |
501 .Ve | |
502 .Sp | |
503 Set bit values in \fIBitVector\fR using specified \fIBinaryString\fR and return \fIBitVector\fR. The | |
504 size of \fIBitVector\fR is not changed. | |
505 .IP "\fBSetBitsAsDecimalString\fR" 4 | |
506 .IX Item "SetBitsAsDecimalString" | |
507 .Vb 1 | |
508 \& $BitVector\->SetBitsAsDecimalString($DecimalString, [$BitOrder]); | |
509 .Ve | |
510 .Sp | |
511 Set bit values in \fIBitVector\fR using specified \fIDecimalString\fR and return \fIBitVector\fR. The | |
512 size of \fIBitVector\fR is not changed. | |
513 .IP "\fBSetBitsAsHexadecimalString\fR" 4 | |
514 .IX Item "SetBitsAsHexadecimalString" | |
515 .Vb 1 | |
516 \& $BitVector\->SetBitsAsHexadecimalString($HexadecimalString, [$BitOrder]); | |
517 .Ve | |
518 .Sp | |
519 Set bit values in \fIBitVector\fR using specified \fIHexadecimalString\fR and return \fIBitVector\fR. The | |
520 size of \fIBitVector\fR is not changed. | |
521 .IP "\fBSetBitsAsOctalString\fR" 4 | |
522 .IX Item "SetBitsAsOctalString" | |
523 .Vb 1 | |
524 \& $BitVector\->SetBitsAsOctalString($OctalString, [$BitOrder]); | |
525 .Ve | |
526 .Sp | |
527 Set bit values in \fIBitVector\fR using specified \fIOctalString\fR and return \fIBitVector\fR. The | |
528 size of \fIBitVector\fR is not changed. | |
529 .IP "\fBSetBitsAsRawBinaryString\fR" 4 | |
530 .IX Item "SetBitsAsRawBinaryString" | |
531 .Vb 1 | |
532 \& $BitVector\->SetBitsAsRawBinaryString($RawBinaryString); | |
533 .Ve | |
534 .Sp | |
535 Set bit values in \fIBitVector\fR using specified \fIRawBinaryString\fR and return \fIBitVector\fR. The | |
536 size of \fIBitVector\fR is not changed. | |
537 .IP "\fBSetBitsRange\fR" 4 | |
538 .IX Item "SetBitsRange" | |
539 .Vb 1 | |
540 \& $BitVector\->SetBitsRange($MinBitNum, $MaxBitNum); | |
541 .Ve | |
542 .Sp | |
543 Set specified bit numbers between \fIMinBitNum\fR and \fIMaxBitNum\fR to 1 in \fIBitVector\fR | |
544 object and return \fIBitVector\fR. | |
545 .IP "\fBStringifyBitVector\fR" 4 | |
546 .IX Item "StringifyBitVector" | |
547 .Vb 1 | |
548 \& $String = $BitVector\->StringifyBitVector(); | |
549 .Ve | |
550 .Sp | |
551 Returns a string containing information about \fIBitVector\fR object. | |
552 .SH "AUTHOR" | |
553 .IX Header "AUTHOR" | |
554 Manish Sud <msud@san.rr.com> | |
555 .SH "SEE ALSO" | |
556 .IX Header "SEE ALSO" | |
557 Vector.pm | |
558 .SH "COPYRIGHT" | |
559 .IX Header "COPYRIGHT" | |
560 Copyright (C) 2015 Manish Sud. All rights reserved. | |
561 .PP | |
562 This file is part of MayaChemTools. | |
563 .PP | |
564 MayaChemTools is free software; you can redistribute it and/or modify it under | |
565 the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free | |
566 Software Foundation; either version 3 of the License, or (at your option) | |
567 any later version. |