class_docstr: NCV (Nearly-Constant Velocity) dynamic model with DWNA (Discrete White
  Noise Acceleration).
  
  :param dimension: native state dimension.
  :param sa2: variance of acceleration. Usually chosen so that the standard
        deviation is roughly half of the max acceleration one would ever
        expect to observe.
  
  References:
      "Estimation with Applications to Tracking and Navigation" by Y. Bar-
      Shalom et al, 2001, p.273.
class_docstr_tok: ["NCV","(","Nearly-Constant","Velocity",")","dynamic","model","with","DWNA","(","Discrete","White","Noise","Acceleration",")",".",":","param","dimension",":","native","state","dimension",".",":","param","sa2",":","variance","of","acceleration",".","Usually","chosen","so","that","the","standard","deviation","is","roughly","half","of","the","max","acceleration","one","would","ever","expect","to","observe",".","References",":","``","Estimation","with","Applications","to","Tracking","and","Navigation","''","by","Y.","Bar-","Shalom","et","al",",","2001",",","p.273","."]
docstr: Compute and return cached process noise covariance (Q).
  
  :param dt: time interval to integrate over.
  :return: Read-only covariance (Q) of the native state `x` resulting from
      stochastic integration (for use with EKF). (Note that this Q, modulo
      numerical error, has rank `dimension/2`. So, it is only positive
      semi-definite.)
docstr_tok: ["Compute","and","return","cached","process","noise","covariance","(","Q",")",".",":","param","dt",":","time","interval","to","integrate","over",".",":","return",":","Read-only","covariance","(","Q",")","of","the","native","state","`","x","`","resulting","from","stochastic","integration","(","for","use","with","EKF",")",".","(","Note","that","this","Q",",","modulo","numerical","error",",","has","rank","`","dimension\/2","`",".","So",",","it","is","only","positive","semi-definite",".",")"]
code: def process_noise_cov(self, dt=0.0):
      """
      Compute and return cached process noise covariance (Q).
  
      :param dt: time interval to integrate over.
      :return: Read-only covariance (Q) of the native state `x` resulting from
          stochastic integration (for use with EKF). (Note that this Q, modulo
          numerical error, has rank `dimension/2`. So, it is only positive
          semi-definite.)
      """
      if dt not in self._Q_cache:
          with torch.no_grad():
              d = self._dimension
              dt2 = dt * dt
              dt3 = dt2 * dt
              dt4 = dt2 * dt2
              Q = torch.zeros(
                  d, d, dtype=self.sa2.dtype, device=self.sa2.device
              )
              Q[: d // 2, : d // 2] = (
                  0.25 * dt4 * eye_like(self.sa2, d // 2)
              )
              Q[: d // 2, d // 2 :] = (
                  0.5 * dt3 * eye_like(self.sa2, d // 2)
              )
              Q[d // 2 :, : d // 2] = (
                  0.5 * dt3 * eye_like(self.sa2, d // 2)
              )
              Q[d // 2 :, d // 2 :] = dt2 * eye_like(self.sa2, d // 2)
          Q = Q * self.sa2
          self._Q_cache[dt] = Q
  
      return self._Q_cache[dt]
  
imports: from abc import ABCMeta, abstractmethod
  import torch
  from torch import nn
  from torch.nn import Parameter
  import pyro.distributions
  from pyro.distributions.util import eye_like
label_desc: Use image node_id 1 for calling the NcvDiscrete obj's underlying member method code with example usage: obj.process_noise_cov(dt) and returns: self