<commit_before>=provide(:title, "#{@matrix.group}/#{@matrix.name}")
%h2= "#{@matrix.group}/#{@matrix.name}"

%div{style: "padding-bottom: 20px;"}
  .h4= @matrix.description
  .row
    .col-md-6.col-md-push-6
      .carousel
        %figure.slick-slide
          %a{href: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.gif"}
            %img.img-responsive{src: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.gif", alt: "Force-Directed Graph Visualization of #{@matrix.group}/#{@matrix.name}"}
        -if @matrix.rb_type and @matrix.rb_type == 'complex'
          %figure.slick-slide
            %a{href: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.APlusAT.gif"}
              %img.img-responsive{src: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.APlusAT.gif", alt: "Graph Visualization of A+A' for #{@matrix.group}/#{@matrix.name}"}
        %figure.slick-slide
          %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}.png"}
            %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}.png", alt: "Nonzero Pattern of #{@matrix.group}/#{@matrix.name}"}
        -if @matrix.norm
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_svd.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_svd.png", alt: "Singular Values of #{@matrix.group}/#{@matrix.name}"}
        -if has_gplot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_gplot.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_gplot.png", alt: "3D Graph Plot of #{@matrix.group}/#{@matrix.name}"}
        -if has_dmperm_plot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_dmperm.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_dmperm.png", alt: "Dulmage-Mendelsohn Permutation of #{@matrix.group}/#{@matrix.name}"}
        -if has_scc_plot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_scc.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_scc.png", alt: "Connected Components of the Bipartite Graph of #{@matrix.group}/#{@matrix.name}"}
    .col-md-6.col-md-pull-6
      %table.table.table-striped
        %tbody
          %tr
            %th Name
            %td= @matrix.name
          %tr
            %th Group
            %td= link_to "#{@matrix.group}", "/#{@matrix.group}"
          %tr
            %th Matrix ID
            %td= @matrix.matrix_id
          %tr
            %th
              %p
                Num Rows
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_rows)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.num_rows, :delimiter => ',')
          %tr
            %th 
              %p
                Num Cols
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_cols)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.num_cols, :delimiter => ',')
          %tr
            %th
              %p
                Nonzeros
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:nonzeros)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.nonzeros, :delimiter => ',')
          %tr
            %th
              %p
                Kind
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:kind)}
                  = fa_icon 'question-circle'
            %td= @matrix.kind.titleize.gsub(/2\sD/, '2D').gsub(/3\sD/, '3D') unless @matrix.kind.nil?
          %tr
            %th
              %p
                Symmetric
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:symmetric)}
                  = fa_icon 'question-circle'
            %td= @matrix.structure == "symmetric" ? "Yes" : "No"
          %tr
            %th
              %p
                Date
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:date)}
                  = fa_icon 'question-circle'
            %td= @matrix.date
          %tr
            %th
              %p
                Author
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:author)}
                  = fa_icon 'question-circle'
            %td= @matrix.author
          %tr
            %th
              %p
                Editor
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:editor)}
                  = fa_icon 'question-circle'
            %td= @matrix.editor

  .row
    .col-md-6
      %table.table.table-striped
        %tbody
          %tr
            %th Structural Rank
            %td= @matrix.structural_rank
          %tr
            %th Structural Rank Full
            %td= @matrix.structural_full_rank
          %tr
            %th
              %p
                Num Dmperm Blocks
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_dmperm_blocks)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_dmperm_blocks
          %tr
            %th
              %p
                Strongly Connect Components
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_strongly_connected_components)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_strongly_connected_components
          %tr
            %th
              %p
                Num Explicit Zeros
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_explicit_zeros)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_explicit_zeros
          %tr
            %th
              %p
                Pattern Symmetry
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:pattern_symmetry)}
                  = fa_icon 'question-circle'
            %td= number_to_percentage(@matrix.pattern_symmetry ? @matrix.pattern_symmetry*100 : nil, precision:0)
          %tr
            %th
              %p
                Numeric Symmetry
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:numeric_symmetry)}
                  = fa_icon 'question-circle'
            %td= number_to_percentage(@matrix.numeric_symmetry ? @matrix.numeric_symmetry*100 : nil, precision:0)
          %tr
            %th
              %p
                Cholesky Candidate
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:cholesky_candidate)}
                  = fa_icon 'question-circle'
            %td= @matrix.cholesky_candidate
          %tr
            %th
              %p
                Positive Definite
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:positive_definite)}
                  = fa_icon 'question-circle'
            %td= @matrix.positive_definite
          %tr
            %th
              %p
                Type
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:rb_type)}
                  = fa_icon 'question-circle'
            %td{colspan: 2}= @matrix.rb_type
    - if @matrix.norm
      .col-md-6
        %table.table.table-striped
          %tbody
            %tr
              %th{colspan:2, style: 'text-align: center'} SVD Statistics
            %tr
              %th Matrix Norm
              %td= number_with_delimiter(@matrix.norm, :delimiter => ',')
            %tr
              %th Minimum Singular Value
              %td= @matrix.min_singular_value
            %tr
              %th Condition Number
              %td= number_with_delimiter(@matrix.condition_number, :delimiter => ',')
            %tr
              %th Rank
              %td= number_with_delimiter(@matrix.svd_rank, :delimiter => ',')
            %tr
              %th sprank(A)-rank(A)
              %td= number_with_delimiter(@matrix.sprank_minus_rank, :delimiter => ',')
            %tr
              %th Null Space Dimension
              %td= number_with_delimiter(@matrix.null_space_dimension, :delimiter => ',')
            %tr
              %th Full Numerical Rank?
              %td= @matrix.full_numerical_rank
            %tr
              %th Download Singular Values
              %td= link_to "MATLAB #{fa_icon 'download'}".html_safe, @matrix.get_url(:svd), class: "btn btn-default"
  .row
    .col-md-12
      %table.table.table-striped
        %tbody
          %tr
            %th Download
            %td
              = link_to "MATLAB #{fa_icon 'download'}".html_safe, @matrix.get_url(:matlab), class: "btn btn-default"
              = link_to "Rutherford Boeing #{fa_icon 'download'}".html_safe, @matrix.get_url(:rutherford_boeing), class: "btn btn-default"
              = link_to "Matrix Market #{fa_icon 'download'}".html_safe, @matrix.get_url(:matrix_market), class: "btn btn-default"
          %tr
            %th Notes
            %td
              - if @matrix.notes
                .notesbox
                  %pre.pre-scrollable= @matrix.notes
:coffeescript
  $(document).on 'turbolinks:load', ->
    $('.carousel').not('.slick-initialized').slick({
      adaptiveHeight: true,
      slidesToShow: 1,
      dots: true
    });
:javascript
  $(document).ready(function(){
    $('[data-toggle="tooltip"]').tooltip(); 
  });<commit_msg>Change image URL to point to sparse.tamu.edu for graph visualizations<commit_after>=provide(:title, "#{@matrix.group}/#{@matrix.name}")
%h2= "#{@matrix.group}/#{@matrix.name}"

%div{style: "padding-bottom: 20px;"}
  .h4= @matrix.description
  .row
    .col-md-6.col-md-push-6
      .carousel
        %figure.slick-slide
          %a{href: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.gif"}
            %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_graph.gif", alt: "Force-Directed Graph Visualization of #{@matrix.group}/#{@matrix.name}"}
        -if @matrix.num_rows and @matrix.num_cols and @matrix.num_rows == @matrix.num_cols and @matrix.pattern_symmetry and @matrix.pattern_symmetry < 1
          %figure.slick-slide
            %a{href: "http://yifanhu.net/GALLERY/GRAPHS/GIF_SMALL/#{@matrix.group}@#{@matrix.name}.APlusAT.gif"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_APlusAT_graph.gif", alt: "Graph Visualization of A+A' for #{@matrix.group}/#{@matrix.name}"}
        %figure.slick-slide
          %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}.png"}
            %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}.png", alt: "Nonzero Pattern of #{@matrix.group}/#{@matrix.name}"}
        -if @matrix.norm
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_svd.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_svd.png", alt: "Singular Values of #{@matrix.group}/#{@matrix.name}"}
        -if has_gplot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_gplot.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_gplot.png", alt: "3D Graph Plot of #{@matrix.group}/#{@matrix.name}"}
        -if has_dmperm_plot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_dmperm.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_dmperm.png", alt: "Dulmage-Mendelsohn Permutation of #{@matrix.group}/#{@matrix.name}"}
        -if has_scc_plot(@matrix)
          %figure.slick-slide
            %a{href: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_scc.png"}
              %img.img-responsive{src: "#{Matrix.get_base_url}files/#{@matrix.group}/#{@matrix.name}_scc.png", alt: "Connected Components of the Bipartite Graph of #{@matrix.group}/#{@matrix.name}"}
    .col-md-6.col-md-pull-6
      %table.table.table-striped
        %tbody
          %tr
            %th Name
            %td= @matrix.name
          %tr
            %th Group
            %td= link_to "#{@matrix.group}", "/#{@matrix.group}"
          %tr
            %th Matrix ID
            %td= @matrix.matrix_id
          %tr
            %th
              %p
                Num Rows
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_rows)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.num_rows, :delimiter => ',')
          %tr
            %th 
              %p
                Num Cols
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_cols)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.num_cols, :delimiter => ',')
          %tr
            %th
              %p
                Nonzeros
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:nonzeros)}
                  = fa_icon 'question-circle'
            %td= number_with_delimiter(@matrix.nonzeros, :delimiter => ',')
          %tr
            %th
              %p
                Kind
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:kind)}
                  = fa_icon 'question-circle'
            %td= @matrix.kind.titleize.gsub(/2\sD/, '2D').gsub(/3\sD/, '3D') unless @matrix.kind.nil?
          %tr
            %th
              %p
                Symmetric
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:symmetric)}
                  = fa_icon 'question-circle'
            %td= @matrix.structure == "symmetric" ? "Yes" : "No"
          %tr
            %th
              %p
                Date
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:date)}
                  = fa_icon 'question-circle'
            %td= @matrix.date
          %tr
            %th
              %p
                Author
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:author)}
                  = fa_icon 'question-circle'
            %td= @matrix.author
          %tr
            %th
              %p
                Editor
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:editor)}
                  = fa_icon 'question-circle'
            %td= @matrix.editor

  .row
    .col-md-6
      %table.table.table-striped
        %tbody
          %tr
            %th Structural Rank
            %td= @matrix.structural_rank
          %tr
            %th Structural Rank Full
            %td= @matrix.structural_full_rank
          %tr
            %th
              %p
                Num Dmperm Blocks
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_dmperm_blocks)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_dmperm_blocks
          %tr
            %th
              %p
                Strongly Connect Components
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_strongly_connected_components)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_strongly_connected_components
          %tr
            %th
              %p
                Num Explicit Zeros
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:num_explicit_zeros)}
                  = fa_icon 'question-circle'
            %td= @matrix.num_explicit_zeros
          %tr
            %th
              %p
                Pattern Symmetry
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:pattern_symmetry)}
                  = fa_icon 'question-circle'
            %td= number_to_percentage(@matrix.pattern_symmetry ? @matrix.pattern_symmetry*100 : nil, precision:0)
          %tr
            %th
              %p
                Numeric Symmetry
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:numeric_symmetry)}
                  = fa_icon 'question-circle'
            %td= number_to_percentage(@matrix.numeric_symmetry ? @matrix.numeric_symmetry*100 : nil, precision:0)
          %tr
            %th
              %p
                Cholesky Candidate
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:cholesky_candidate)}
                  = fa_icon 'question-circle'
            %td= @matrix.cholesky_candidate
          %tr
            %th
              %p
                Positive Definite
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:positive_definite)}
                  = fa_icon 'question-circle'
            %td= @matrix.positive_definite
          %tr
            %th
              %p
                Type
                %a.small{href: '#', 'data-toggle': 'tooltip', title: tooltip_text(:rb_type)}
                  = fa_icon 'question-circle'
            %td{colspan: 2}= @matrix.rb_type
    - if @matrix.norm
      .col-md-6
        %table.table.table-striped
          %tbody
            %tr
              %th{colspan:2, style: 'text-align: center'} SVD Statistics
            %tr
              %th Matrix Norm
              %td= number_with_delimiter(@matrix.norm, :delimiter => ',')
            %tr
              %th Minimum Singular Value
              %td= @matrix.min_singular_value
            %tr
              %th Condition Number
              %td= number_with_delimiter(@matrix.condition_number, :delimiter => ',')
            %tr
              %th Rank
              %td= number_with_delimiter(@matrix.svd_rank, :delimiter => ',')
            %tr
              %th sprank(A)-rank(A)
              %td= number_with_delimiter(@matrix.sprank_minus_rank, :delimiter => ',')
            %tr
              %th Null Space Dimension
              %td= number_with_delimiter(@matrix.null_space_dimension, :delimiter => ',')
            %tr
              %th Full Numerical Rank?
              %td= @matrix.full_numerical_rank
            %tr
              %th Download Singular Values
              %td= link_to "MATLAB #{fa_icon 'download'}".html_safe, @matrix.get_url(:svd), class: "btn btn-default"
  .row
    .col-md-12
      %table.table.table-striped
        %tbody
          %tr
            %th Download
            %td
              = link_to "MATLAB #{fa_icon 'download'}".html_safe, @matrix.get_url(:matlab), class: "btn btn-default"
              = link_to "Rutherford Boeing #{fa_icon 'download'}".html_safe, @matrix.get_url(:rutherford_boeing), class: "btn btn-default"
              = link_to "Matrix Market #{fa_icon 'download'}".html_safe, @matrix.get_url(:matrix_market), class: "btn btn-default"
          %tr
            %th Notes
            %td
              - if @matrix.notes
                .notesbox
                  %pre.pre-scrollable= @matrix.notes
:coffeescript
  $(document).on 'turbolinks:load', ->
    $('.carousel').not('.slick-initialized').slick({
      adaptiveHeight: true,
      slidesToShow: 1,
      dots: true
    });
:javascript
  $(document).ready(function(){
    $('[data-toggle="tooltip"]').tooltip(); 
  });
{'fraction_non_alphanumeric': 0.1500956985997784, 'fraction_numerical': 0.0028709579933514657, 'mean_word_length': 1.7788663400979705, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7128720', 'n_tokens_mistral': 6273, 'n_tokens_neox': 6142, 'n_words': 1032}