 }

  void SetValues(std::vector<Real> v_in) { values = v_in; }

  int GetSize() const { return sizeX * sizeY * sizeZ; }

  int SizeX() { return sizeX; }

  int SizeY() { return sizeY; }

  int SizeZ() { return sizeZ; }

  Volume Normalize() {
    Real tmpMax = 0.0;
    for (auto v : values) {
      tmpMax = std::max(tmpMax, v);
    }
    if (tmpMax!= 0.0) {
      for (auto& v : values) {
        v /= tmpMax;
      }
    }
    return *this;
  }

  Volume operator+(const Volume& rhs) {
    assert(this->sizeX == rhs.sizeX && this->sizeY == rhs.sizeY &&
           this->sizeZ == rhs.sizeZ);

    int size = sizeX * sizeY * sizeZ;
    std::vector<Real> ret(size);
    for (int i = 0; i < size; i++) {
      ret[i] = this->GetValue(i) + rhs.GetValue(i);
    }
    return Volume(sizeX, sizeY, sizeZ, ret);
  }

  Volume operator-(const Volume& rhs) {
    assert(this->sizeX == rhs.sizeX && this->sizeY == rhs.sizeY &&
           this->sizeZ == rhs.sizeZ);

    int size = sizeX * sizeY * sizeZ;
    std::vector<Real> ret(size);
    for (int i = 0; i < size; i++) {
      ret[i] = this->GetValue(i) - rhs.GetValue(i);
    }
    return Volume(sizeX, sizeY, sizeZ, ret);
  }

  Volume EwiseProduct(const Volume& rhs) {
    assert(this->sizeX == rhs.sizeX && this->sizeY == rhs.sizeY &&
           this->sizeZ == rhs.sizeZ);

    int size = sizeX * sizeY * sizeZ;
    std::vector<Real> ret(size);
    for (int i = 0; i < size; i++) {
      ret[i] = this->GetValue(i) * rhs.GetValue(i);
    }
    return Volume(sizeX, sizeY, sizeZ, ret);
  }

  Volume Scalar(const Real r) {
    int size = sizeX * sizeY * sizeZ;
    std::vector<Real> ret(size);
    for (int i = 0; i < size; i++) {
      ret[i] = this->GetValue(i) * r;
    }
    return Volume(sizeX, sizeY, sizeZ, ret);
  }

  void Stat() {
    int size = sizeX * sizeY * sizeZ;
    Real sum = 0.0;
    Real max = 0.0;
    for (int i = 0; i < size; i++) {
      sum += this->GetValue(i);
      max = std::max(this->GetValue(i), max);
    }
    Real mean = sum / (Real)size;
    Real var  = 0.0;
    for (int i = 0; i < size; i++) {
      Real diff = this->GetValue(i) - mean;
      var += diff * diff;
    }
    Real stddev = sqrt(var / (Real)size);
  }

  Volume(const Volume& p) {
    sizeX  = p.sizeX;
    sizeY  = p.sizeY;
    sizeZ  = p.sizeZ;
    values = p.values;
  }

  Volume(Volume&& p) {
    sizeX  = p.sizeX;
    sizeY  = p.sizeY;
    sizeZ  = p.sizeZ;
    values = std::move(p.values);
  }

  Volume& operator=(const Volume& p) {
    sizeX  = p.sizeX;
    sizeY  = p.sizeY;
    sizeZ  = p.sizeZ;
    values = p.values;
    return *this;
  }

  Volume& operator=(Volume&& p) {
    sizeX  = p.sizeX;
    sizeY  = p.sizeY;
    sizeZ  = p.sizeZ;
    values = std::move(p.values);
    return *this;
  }

  Volume lerpWith(const Volume& vol, const Real ratio) {
    assert(this->sizeX == vol.sizeX && this->sizeY == vol.sizeY &&
           this->sizeZ == vol.sizeZ);

    int size           = sizeX * sizeY * sizeZ;
    Real oneMinusRatio = 1.0 - ratio;
    std::vector<Real> ret(size);
    for (int i = 0; i < size; i++) {
      ret[i] = this->GetValue(i) * ratio + vol.GetValue(i) * oneMinusRatio;
    }
    return Volume(sizeX, sizeY, sizeZ, ret);
  }

  Real GetLerpValue(Real x, Real y, Real z) const {
    auto lerp = [&](Real v1, Real v2, Real ratio) -> Real {
      return v1 * ratio + v2 * (1.0 - ratio);
    };
    int xId     = (int)x;
    int yId     = (int)y;
    int zId     = (int)z;
    Real xRatio = x - (Real)xId;
    Real yRatio = y - (Real)yId;
    Real zRatio = z - (Real)zId;

    return lerp(
        lerp(lerp(GetValue(xId + 1, yId + 1, zId + 1),
                  GetValue(xId, yId + 1, zId + 1), xRatio),
             lerp(GetValue(xId + 1, yId, zId + 1), GetValue(xId, yId, zId + 1),
                  xRatio),
             yRatio),
        lerp(lerp(GetValue(xId + 1, yId + 1, zId), GetValue(xId, yId + 1, zId),
                  xRatio),
             lerp(GetValue(xId + 1, yId, zId), GetValue(xId, yId, zId), xRatio),
             yRatio),
        zRatio);
  }

private:
  std::vector<Real> values;
  int sizeX = 0;
  int sizeY = 0;
  int sizeZ = 0;
};
Federal Minister of Defence Khawaja Muhammad Asif has said certain insane quarters have resorted to derogatory comments for the martyred soldiers on social media which is highly condemnable, reported 24 News HD TV Channel.
Addressing a press conference on Saturday, he said there is trolling on the Shaheed army officers, this is a sad and shameful behavior of the PTI youth. It has left the families of the military and kin of those martyred in Lasbela incident deeply anguished and distressed.
“The nation is standing behind the institution in this difficult time but some people are trying to malign the military just to fulfill the Indian’s agenda,” he lamented.
He alleged that some political figures are behind the negative propaganda against the army. The social media workers are encouraged and being paid regularly for making a negative image of the national institutions, he added.
He said Pakistan Army has made eternal sacrifices for the country and these should not be gone unnoticed.
 Pompeii ruins, House of Faun, Forum, Temple of Apollo, and Amphitheatre with Mount Vesuvius in view
Tour the Italy's financial capital Milan and observe its French Gothic and Neoclassical architecture
Learn about Illinois's soybean and corn production, Cahokia Mounds, and cities Chicago, Aurora, and Joliet
Learn about Mexico City's history from the conquistadores to the diverse metropolitan of the 21st century
Observe the picturesque landscape of rural North Wales preserved from intensive mining campaigns as well as the historic 13th-century Castle of Conwy
Explore the culture and tradition of the cosmopolitan city Dublin, the fashion, music, Trinity College, and the vibrant pubs frequented by tourists and Dubliners
Walk Copenhagen's streets to learn what makes it a Scandinavian political, administrative, and cultural centre
Tour the Royal Monastery in El Escorial where all but three Spanish kings have been buried since Charles V
Explore how Portuguese colonialism, slavery, and European migration contributed to Brazil's diversity
Travel down the erosive Colorado River in Utah to study its ancient geologic footprint and sandbar formation
Study London's