.. _method-sampling-sample_type-low_discrepancy-digital_net-t_scramble:

""""""""""
t_scramble
""""""""""


Number of rows in the affine scramble matrices



.. toctree::
   :hidden:
   :maxdepth: 1



**Specification**

- *Alias:* None

- *Arguments:* INTEGER

- *Default:* 64


**Description**


Use this option to set the number of rows in the linear scramble matrices.
A linear scrambling matrix is a lower-tridiagonal matrix with shape
``t_scramble x t_max`` with 1s on the diagonal, i.e.,

.. code-block::

    1 0 0 0 0
    x 1 0 0 0
    x x 1 0 0
    x x x 1 0
    x x x x 1

which is encoded as a vector of length ``t_max``, with integer entries 
of ``t_scramble`` bits each, encoding the columns of the scramble matrix (analogous to the way generating matrices are stored).
The value of ``t_scramble`` must be greater than or equal to :dakkw:`method-sampling-sample_type-low_discrepancy-digital_net-t_max`.
Note that this option has no effect if the keyword :dakkw:`method-sampling-sample_type-low_discrepancy-digital_net-no_scrambling` is specified. By default, Dakota uses ``t_scramble = t_max``.




**Examples**



.. code-block::

    environment
      tabular_data
        tabular_data_file = 'samples.dat'
        freeform

    method
      sampling
        samples 32
        sample_type
          low_discrepancy
            digital_net
              generating_matrices inline 
                1 2 4 8 16
                # this encodes the generating matrix
                # 1 0 0 0 0
                # 0 1 0 0 0
                # 0 0 1 0 0 
                # 0 0 0 1 0
                # 0 0 0 0 1
                1 3 5 15 17
                # this encodes the generating matrix
                # 1 1 1 1 1
                # 0 1 0 1 0
                # 0 0 1 1 0
                # 0 0 0 1 0
                # 0 0 0 0 1
              m_max 5
              t_max 5
              t_scramble 5
              no_digital_shift

    variables
      uniform_uncertain = 2
        lower_bounds 0.0 0.0
        upper_bounds 1.0 1.0

    interface
      analysis_drivers = 'genz'
      analysis_components = 'cp1'
      direct

    responses
      response_functions = 1
      no_gradients
      no_hessians



