class_docstr: The "sawbridge": B(t) = t - 1(t > Z), where Z is uniform over [0,1].
  
  The stationary sawbridge is B(t + V mod 1), where V is uniform over [0,1] and
  Z, V are independent.
class_docstr_tok: ["The","``","sawbridge","''",":","B","(","t",")","=","t","-","1","(","t",">","Z",")",",","where","Z","is","uniform","over","[","0,1","]",".","The","stationary","sawbridge","is","B","(","t","+","V","mod","1",")",",","where","V","is","uniform","over","[","0,1","]","and","Z",",","V","are","independent","."]
docstr: Initializer.
  
  Args:
    index_points: 1-D `Tensor` representing the locations at which to evaluate
      the process. The intent is that all locations are in [0,1], but the
      process has a natural extrapolation outside this range so no error is
      thrown.
    phase: Float in [0,1] or `None` (default). Specifies realization of V.
    drop: Float in [0,1] or `None` (default). Specifies realization of Z.
    stationary: Boolean. Whether or not to "scramble" phase.
    order: Integer >= 1. The resulting process is a linear combination of
      `order` sawbridges.
    dtype: Data type of the returned realization. Defaults to `tf.float32`.
    validate_args: required by `Distribution` class but unused.
    allow_nan_stats: required by `Distribution` class but unused.
    name: String. Name of the created object.
docstr_tok: ["Initializer",".","Args",":","index_points",":","1-D","`","Tensor","`","representing","the","locations","at","which","to","evaluate","the","process",".","The","intent","is","that","all","locations","are","in","[","0,1","]",",","but","the","process","has","a","natural","extrapolation","outside","this","range","so","no","error","is","thrown",".","phase",":","Float","in","[","0,1","]","or","`","None","`","(","default",")",".","Specifies","realization","of","V.","drop",":","Float","in","[","0,1","]","or","`","None","`","(","default",")",".","Specifies","realization","of","Z.","stationary",":","Boolean",".","Whether","or","not","to","``","scramble","''","phase",".","order",":","Integer",">","=","1",".","The","resulting","process","is","a","linear","combination","of","`","order","`","sawbridges",".","dtype",":","Data","type","of","the","returned","realization",".","Defaults","to","`","tf.float32","`",".","validate_args",":","required","by","`","Distribution","`","class","but","unused",".","allow_nan_stats",":","required","by","`","Distribution","`","class","but","unused",".","name",":","String",".","Name","of","the","created","object","."]
code: def __init__(
      self,
      index_points,
      phase=None,
      drop=None,
      stationary=True,
      order=1,
      dtype=tf.float32,
      validate_args=False,
      allow_nan_stats=True,
      name="sawbridge",
  ):
      """Initializer.
  
      Args:
        index_points: 1-D `Tensor` representing the locations at which to evaluate
          the process. The intent is that all locations are in [0,1], but the
          process has a natural extrapolation outside this range so no error is
          thrown.
        phase: Float in [0,1] or `None` (default). Specifies realization of V.
        drop: Float in [0,1] or `None` (default). Specifies realization of Z.
        stationary: Boolean. Whether or not to "scramble" phase.
        order: Integer >= 1. The resulting process is a linear combination of
          `order` sawbridges.
        dtype: Data type of the returned realization. Defaults to `tf.float32`.
        validate_args: required by `Distribution` class but unused.
        allow_nan_stats: required by `Distribution` class but unused.
        name: String. Name of the created object.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          self._index_points = tf.convert_to_tensor(
              index_points, dtype_hint=dtype, name="index_points"
          )
          self._stationary = bool(stationary)
          self._order = int(order)
          self._phase = phase
          self._drop = drop
      super().__init__(
          dtype=dtype,
          reparameterization_type=tfp.distributions.NOT_REPARAMETERIZED,
          validate_args=validate_args,
          allow_nan_stats=allow_nan_stats,
          parameters=parameters,
          name=name,
      )
  
file_path: compression/models/toy_sources/sawbridge.py
imports: import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 1 to create a new Sawbridge object from inherited base classes: tfp.distributions with example: obj = Sawbridge(index_points, phase, drop, stationary, order, dtype, validate_args, allow_nan_stats, name)