Documentation for Box.py
Note: this module is still under development and might change significantly.
ArrayGrid
Bases: Grid
A dense, lossy implementation of the grid.
Source code in vimms/Box.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | |
BoxExact
Bases: BoxGeometry
Source code in vimms/Box.py
723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | |
splitting_intensity_non_overlap(box, other_boxes, current_intensity, scoring_params)
staticmethod
Will give nonsense results if other_boxes overlap each other.
Source code in vimms/Box.py
759 760 761 762 763 764 765 766 767 768 769 | |
BoxGeometry
Describes the interface for an abstract class which can do geometric operations on points, intervals and rectangles. Different subclasses use different data structures, and hence the choice of data structure matters for performance.
Source code in vimms/Box.py
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
BoxLineSweeper
Bases: BoxExact
Source code in vimms/Box.py
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | |
non_overlap(box)
NB: This won't work if the boxes are capable of moving between time updates.
Source code in vimms/Box.py
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | |
DictGrid
Bases: Grid
A sparse, lossless implementation of the grid.
Source code in vimms/Box.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
GenericBox
Bases: Box
Makes no particular assumptions about bounding boxes.
Source code in vimms/Box.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
non_overlap_split(other_box)
Finds 1 to 4 boxes describing the polygon of area of this box not overlapped by other_box. If one box is found, crops this box to dimensions of that box, and returns None. Otherwise, returns list of 2 to 4 boxes. Number of boxes found is equal to number of edges overlapping area does NOT share with this box.
Source code in vimms/Box.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
Grid
Partitions a 2D space into a number of rectangles of fixed size for faster lookup. If a query object and a saved object touch the same rectangle, then the saved object should be factored into the query.
Source code in vimms/Box.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |
LocatorGrid
Bases: Grid
A dense, lossless implementation of the grid.
Source code in vimms/Box.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | |