/
| 552 | public: |
| 553 | /*****************************************************/ |
| 554 | bool operator==( buffer<T> & other_buffer ) |
| 555 | { |
| 556 | // complexity of each dimension must be the same |
| 557 | if( ( is_real() && !other_buffer.is_real() ) || ( !is_real() && other_buffer.is_real() ) || |
| 558 | ( is_hermitian() && !other_buffer.is_hermitian() ) || ( !is_hermitian() && other_buffer.is_hermitian() ) || |
| 559 | ( is_complex() && !other_buffer.is_complex() ) || ( !is_complex() && other_buffer.is_complex() ) ) |
| 560 | { |
| 561 | return false; |
| 562 | } |
| 563 | |
| 564 | // batch_size of the data must be the same |
| 565 | if( batch_size() != other_buffer.batch_size() ) |
| 566 | { |
| 567 | return false; |
| 568 | } |
| 569 | |
| 570 | // dimensionality of the data must be the same |
| 571 | if( number_of_dimensions() != other_buffer.number_of_dimensions() ) |
| 572 | { |
| 573 | return false; |
| 574 | } |
| 575 | |
| 576 | // size of each dimension must be the same |
| 577 | for( size_t i = 0; i < number_of_dimensions(); ++i ) |
| 578 | { |
| 579 | if( length(i) != other_buffer.length(i)) return false; |
| 580 | } |
| 581 | |
| 582 | size_t number_deaths = 0; |
| 583 | number_deaths += buffer_mismatches( other_buffer, comparison_type); |
| 584 | |
| 585 | if( number_deaths == 0 ) return true; |
| 586 | else return false; |
| 587 | } |
| 588 | |
| 589 | /*****************************************************/ |
| 590 | bool operator!=( buffer<T> & other_buffer ) |
nothing calls this directly
no test coverage detected