df_set_val_complex Subroutine

public subroutine df_set_val_complex(df, row_index, col_index, val)

Set single complex value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
complex(kind=rk), intent(in) :: val

Source Code

    subroutine df_set_val_complex(df, row_index, col_index, val)
        type(data_frame), intent(inout) :: df
        integer, intent(in) :: row_index, col_index
        complex(rk), intent(in) :: val

        type(column) :: data_col

        if (col_index < 1 .or. col_index > df % ncols()) error stop "column index out of range"

        data_col = df % get_data_col(col_index)
        if (data_col % get_type() /= COMPLEX_NUM) error stop "column is not complex type"

        call data_col % changec(row_index, val)
        call df % set_data_col(col_index, data_col)
    end subroutine df_set_val_complex