LCOV - code coverage report
Current view: top level - elsa/core/Descriptors - SphericalCoefficientsDescriptor.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 10 11 90.9 %
Date: 2024-10-31 08:42:40 Functions: 3 3 100.0 %

          Line data    Source code
       1             : #include "SphericalCoefficientsDescriptor.h"
       2             : #include "DataDescriptor.h"
       3             : #include "IdenticalBlocksDescriptor.h"
       4             : #include "TypeCasts.hpp"
       5             : 
       6             : namespace elsa
       7             : {
       8             :     SphericalCoefficientsDescriptor::SphericalCoefficientsDescriptor(
       9             :         const DataDescriptor& blockDescriptor, const Symmetry symmetry, const index_t degree)
      10             :         : IdenticalBlocksDescriptor{coefficientCount(symmetry, degree), blockDescriptor},
      11             :           degree{degree},
      12             :           symmetry{symmetry}
      13         240 :     {
      14         240 :     }
      15             : 
      16             :     SphericalCoefficientsDescriptor* SphericalCoefficientsDescriptor::cloneImpl() const
      17         156 :     {
      18         156 :         return new SphericalCoefficientsDescriptor{*_blockDescriptor, symmetry, degree};
      19         156 :     }
      20             : 
      21             :     bool SphericalCoefficientsDescriptor::isEqual(const DataDescriptor& other) const
      22          32 :     {
      23          32 :         if (!IdenticalBlocksDescriptor::isEqual(other))
      24           0 :             return false;
      25             : 
      26             :         // static cast as type checked in base comparison
      27          32 :         const auto& otherBlock = downcast<SphericalCoefficientsDescriptor>(other);
      28          32 :         return degree == otherBlock.degree && symmetry == otherBlock.symmetry;
      29          32 :     }
      30             : 
      31             : } // namespace elsa

Generated by: LCOV version 1.14