2

I am trying to get the following table to span over multiple pages or columns. I have tried using longtable instead of table but that ends up causing other issues. Does anyone know how to fix this? Thanks.

\begin{table}[!ht]
\centering\captionsetup{justification = centering}
\begin{tabular}{|c c c c c c|} 
    \hline
    \#Nodes & Partition Type & Time & Cut & Energy & Modularity \\ [0.5ex] 
    \hline\hline
    
    \multirow{8}{*}{9} & \rowcolor{yellow} kernighan-lin & 473.26 $\mu$s & -11 & 17 & 0.170 \\
     & girvan-newman \rowcolor{yellow} & 2.01 ms & -7 & 20 & 0.180 \\
     & \rowcolor{cyan} ideal cut & 46.04 ms & -11 & 19 & 0.186 \\
     & \rowcolor{cyan} ideal energy & 46.04 ms & -7 & 20 & 0.180 \\
     & \rowcolor{cyan} ideal modularity & 46.04 ms & -11 & 19 & 0.186 \\
     & \rowcolor{pink} SNN \#0 & 1.46 ns & -7 & 15 & 0.125 \\
     & \rowcolor{pink} SNN \#1 & 1.46 ns & -11 & 16 & 0.186 \\
     & \rowcolor{pink} SNN \#2 & 1.46 ns & -11 & 17 & 0.170 \\  \hline
   
    \multirow{8}{*}{18} & \rowcolor{yellow} kernighan-lin & 715.02 $\mu$s & -60 & 83 & 0.284 \\
     & \rowcolor{yellow} girvan-newman & 29.86 ms & -64 & 89 & 0.306 \\
     & \rowcolor{cyan} ideal cut & 72.48 s & -64 & 89 & 0.305 \\
     & \rowcolor{cyan} ideal energy & 72.48 s & 32 & 101 & 0.149 \\
     & \rowcolor{cyan} ideal modularity & 72.48 s & -64 & 89 & 0.305 \\
     & \rowcolor{pink} SNN \#0 & 5.83 ns & -32 & 67 & 0.245 \\
     & \rowcolor{pink} SNN \#1 & 5.83 ns & -32 & 73 & 0.183 \\
     & \rowcolor{pink} SNN \#2 & 5.83 ns & -36 & 73 & 0.208 \\
     & \rowcolor{pink} SNN \#3 & 5.83 ns & -44 & 74 & 0.247 \\ \hline
   
    \multirow{5}{*}{20} & \rowcolor{yellow} kernighan-lin & 979.42 $\mu$s & -74 & 85 & 0.203 \\
     & \rowcolor{yellow} girvan-newman & 44.43 ms & -82 & 85 & 0.224 \\
     & \rowcolor{pink} SNN \#0 & 7.20 ns & -42 & 67 & 0.170 \\
     & \rowcolor{pink} SNN \#1 & 7.20 ns & -46 & 70 & 0.160 \\ 
     & \rowcolor{pink} SNN \#2 & 7.20 ns & -58 & 74 & 0.184 \\ \hline
     
    \multirow{9}{*}{22} & \rowcolor{yellow} metis & 1.64 ms & -92 & 91 & 0.177 \\
     & \rowcolor{yellow} kernighan-lin & 1.61 ms & -92 & 89 & 0.177 \\
     & \rowcolor{yellow} girvan-newman & 84.34 ms & 180 & 101 & -0.00296 \\
     & \rowcolor{cyan} ideal cut & 2.09 ks & -92 & 93 & 0.178 \\
     & \rowcolor{cyan} ideal energy & 2.09 ks & -36 & 101 & 0.124 \\
     & \rowcolor{cyan} ideal modularity & 2.09 ks & -92 & 93 & 0.178 \\
     & \rowcolor{pink} SNN \#0 & 8.71 ns & -76 & 81 & 0.152, \\
     & \rowcolor{pink} SNN \#1 & 8.71 ns & -76 & 81 & 0.152 \\
     & \rowcolor{pink} SNN \#2 & 8.71 ns & -88 & 88 & 0.169 \\ \hline
  
    \multirow{8}{*}{24} & \rowcolor{yellow} kernighan-lin & 1.32 ms & -104 & 108 & 0.173 \\
     & \rowcolor{yellow} girvan_newman & 156.77 ms & -104 & 104 & 0.178 \\
     & \rowcolor{cyan} ideal cut & 8.58 ks & -108 & 108 & 0.18 \\
     & \rowcolor{cyan} ideal energy & 8.58 ks & -44 & 126 & 0.133 \\
     & \rowcolor{cyan} ideal modularity & 8.58 ks & -108 & 108 & 0.18 \\
     & \rowcolor{pink} SNN \#0 & 10.37 ns & -96 & 100 & 0.166 \\
     & \rowcolor{pink} SNN \#1 & 10.37 ns & -96 & 100 & 0.166 \\
     & \rowcolor{pink} SNN \#2 & 10.37 ns & -100 & 103 & 0.172 \\ \hline


    \multirow{9}{*}{24} & \rowcolor{yellow} metis & 1.36 ms  & -120 & 153 & 0.306  \\
     & \rowcolor{yellow} kernighan-lin & 15.03 ms & -120 & 153 & 0.306 \\
     & \rowcolor{yellow} girvan-newman & 113.37 ms & -104 & 142 & 0.272  \\ 
     & \rowcolor{cyan} ideal cut & 11.05 ks & -120 & 150 & 0.306  \\
     & \rowcolor{cyan} ideal energy & 11.05 ks & 76 & 178 & 0.125  \\
     & \rowcolor{cyan} ideal modularity & 11.05 ks & -120 & 150 & 0.306  \\ 
     & \rowcolor{pink} SNN \#0 & 1.44 ns & -84 & 160 & 0.234 \\ 
     & \rowcolor{pink} SNN \#1 & 1.44 ns & -104 & 163 & 0.287  \\ 
     & \rowcolor{pink} SNN \#2 & 1.44 ns & -116 & 157 & 0.3  \\ \hline 
  
    \multirow{10}{*}{25} & \rowcolor{yellow} kernighan-lin & 56.65 ms & -131 & 121 & 0.202 \\
     & \rowcolor{yellow} girvan-newman & 547.38 ms & -135 & 120 & 0.209 \\
     & \rowcolor{cyan} ideal cut & 19.97 ks & -135 & 120 & 0.209 \\
     & \rowcolor{cyan} ideal energy & 19.97 ks & -59 & 138 & 0.147 \\
     & \rowcolor{cyan} ideal modularity & 19.97 ks & -135 & 120 & 0.209 \\
     & \rowcolor{pink} SNN \#0 & 11.25 ns & -107 & 106 & 0.184 \\
     & \rowcolor{pink} SNN \#1 & 11.25 ns & -103 & 106 & 0.177 \\
     & \rowcolor{pink} SNN \#2 & 11.25 ns & -107 & 106 & 0.184 \\
     & \rowcolor{pink} SNN \#3 & 11.25 ns & -87 & 103 & 0.155 \\
     & \rowcolor{pink} SNN \#4 & 11.25 ns & -107 & 106 & 0.184 \\ \hline 
  
    \multirow{6}{*}{35} & \rowcolor{yellow} kernighan-lin & 1.66 ms & -233 & 324 & 0.294 \\
     & \rowcolor{yellow} girvan-newman & 584.88 ms & -185 & 364 & 0.274 \\
     & \rowcolor{pink} SNN \#0 & 22.05 ns & -157 & 269 & 0.269 \\
     & \rowcolor{pink} SNN \#1 & 22.05 ns & -93 & 251 & 0.218 \\
     & \rowcolor{pink} SNN \#2 & 22.05 ns & -117 & 252 & 0.255 \\
     & \rowcolor{pink} SNN \#3 & 22.05 ns & -105 & 250 & 0.241 \\ \hline
    
    \multirow{5}{*}{50} & \rowcolor{yellow} kernighan-lin & 2.02 ms & -356 & 770 & 0.348 \\
     & \rowcolor{yellow} girvan-newman & 776.80 ms & -8 & 556 & 0.269 \\
     & \rowcolor{pink} SNN \#0 & 45.00 ns & 92 & 522 & 0.240 \\
     & \rowcolor{pink} SNN \#1 & 45.00 ns & 108 & 520 & 0.225 \\
     & \rowcolor{pink} SNN \#2 & 45.00 ns & 68 & 545 & 0.200 \\ \hline
    
    \multirow{5}{*}{50} & \rowcolor{yellow} metis & 2.93 ms & -488 & 676 & 0.286 \\
     & \rowcolor{yellow} kernighan-lin & 2.65 ms & -480 & 669 & 0.286 \\
     & \rowcolor{yellow} girvan-newman & 3.15 s & -424 & 604 & 0.273 \\
     & \rowcolor{pink} SNN \#0 & 45.00 ns & -400 & 592 & 0.266 \\
     & \rowcolor{pink} SNN \#1 & 45.00 ns & -444 & 611 & 0.282 \\ \hline 

\end{tabular}
\caption{Results from simulations.}
\label{tab:results}
\end{table}
2
  • 1
    Welcome to TeX.SE. You write, "... using longtable ... ends up causing other issues". What might these issues be. Incidentally, a tabular environment, by construction, cannot span more than one page.
    – Mico
    Apr 25, 2023 at 23:57
  • The example shown here is wrapped in a table environment. Regardless of what's inside it, a table, which is a float, will never break to more than one page. By definition, any float must be contained on a single page. Apr 26, 2023 at 3:20

2 Answers 2

2

Since a tabular environment cannot span more than a page, I suggest you do try using a longtable.

I don't think it's a good idea ot use \multirow since the numbers regularly end up in the blue zone, where they're difficult to spot (and read).

I'd also load the booktabs package and use \addlinespace instead of \hline to create offsets between the groups of rows.

Last but not least, consider aligning the numbers in the three final columns on their (implicit or explicit) decimal markers to make them easier to read.

enter image description here

A final remark: I can't say that I understand the gaudy color scheme. Are your readers supposed to know what the colors mean?

\documentclass{article} % or some other suitable document class

\usepackage{longtable,siunitx,booktabs}
\usepackage[table]{xcolor}
\begin{document}

\begin{longtable}{ ll c 
    S[table-format=-2.0] 
    S[table-format= 3.0] 
    S[table-format=-1.5,group-digits=false]} 

% headers and footers

    \caption{Results from simulations.} \label{tab:results} \\
    \toprule
    \# Nodes & Partition Type & Time & {Cut} & {Energy} & {Modularity} \\[0.25ex] 
    \hline
    \endfirsthead
    
    \multicolumn{6}{l}{Table \thetable, continued} \\[1ex]
    \toprule
    \# Nodes & Partition Type & Time & {Cut} & {Energy} & {Modularity} \\[0.25ex] 
    \hline
    \endhead
    
    \multicolumn{6}{r@{}}{\footnotesize(continued on following page)} \\
    \endfoot
    
    \hline
    \endlastfoot


% body of table

     \rowcolor{yellow} \textbf{9} 
                       & kernighan-lin & 473.26 \textmu s & -11 & 17 & 0.170 \\
     \rowcolor{yellow} & girvan-newman  & 2.01 ms & -7 & 20 & 0.180 \\
     \rowcolor{cyan} & ideal cut & 46.04 ms & -11 & 19 & 0.186 \\
     \rowcolor{cyan} & ideal energy & 46.04 ms & -7 & 20 & 0.180 \\
     \rowcolor{cyan} & ideal modularity & 46.04 ms & -11 & 19 & 0.186 \\
     \rowcolor{pink} & SNN \#0 & 1.46 ns & -7 & 15 & 0.125 \\
     \rowcolor{pink} & SNN \#1 & 1.46 ns & -11 & 16 & 0.186 \\
     \rowcolor{pink} & SNN \#2 & 1.46 ns & -11 & 17 & 0.170 \\  
     \addlinespace   
     \rowcolor{yellow} \textbf{18} 
                       & kernighan-lin & 715.02 \textmu s & -60 & 83 & 0.284 \\
     \rowcolor{yellow} & girvan-newman & 29.86 ms & -64 & 89 & 0.306 \\
     \rowcolor{cyan} & ideal cut & 72.48 s & -64 & 89 & 0.305 \\
     \rowcolor{cyan} & ideal energy & 72.48 s & 32 & 101 & 0.149 \\
     \rowcolor{cyan} & ideal modularity & 72.48 s & -64 & 89 & 0.305 \\
     \rowcolor{pink} & SNN \#0 & 5.83 ns & -32 & 67 & 0.245 \\
     \rowcolor{pink} & SNN \#1 & 5.83 ns & -32 & 73 & 0.183 \\
     \rowcolor{pink} & SNN \#2 & 5.83 ns & -36 & 73 & 0.208 \\
     \rowcolor{pink} & SNN \#3 & 5.83 ns & -44 & 74 & 0.247 \\ 
     \addlinespace  
     \rowcolor{yellow} \textbf{20} 
                       & kernighan-lin & 979.42 \textmu s & -74 & 85 & 0.203 \\
     \rowcolor{yellow} & girvan-newman & 44.43 ms & -82 & 85 & 0.224 \\
     \rowcolor{pink} & SNN \#0 & 7.20 ns & -42 & 67 & 0.170 \\
     \rowcolor{pink} & SNN \#1 & 7.20 ns & -46 & 70 & 0.160 \\ 
     \rowcolor{pink} & SNN \#2 & 7.20 ns & -58 & 74 & 0.184 \\ 
     \addlinespace    
     \rowcolor{yellow} \textbf{22} 
                       & metis & 1.64 ms & -92 & 91 & 0.177 \\
     \rowcolor{yellow} & kernighan-lin & 1.61 ms & -92 & 89 & 0.177 \\
     \rowcolor{yellow} & girvan-newman & 84.34 ms & 180 & 101 & -0.00296 \\
     \rowcolor{cyan} & ideal cut & 2.09 ks & -92 & 93 & 0.178 \\
     \rowcolor{cyan} & ideal energy & 2.09 ks & -36 & 101 & 0.124 \\
     \rowcolor{cyan} & ideal modularity & 2.09 ks & -92 & 93 & 0.178 \\
     \rowcolor{pink} & SNN \#0 & 8.71 ns & -76 & 81 & 0.152 \\
     \rowcolor{pink} & SNN \#1 & 8.71 ns & -76 & 81 & 0.152 \\
     \rowcolor{pink} & SNN \#2 & 8.71 ns & -88 & 88 & 0.169 \\ 
     \addlinespace
     \rowcolor{yellow} \textbf{24}
                       & kernighan-lin & 1.32 ms & -104 & 108 & 0.173 \\
     \rowcolor{yellow} & girvan-newman & 156.77 ms & -104 & 104 & 0.178 \\
     \rowcolor{cyan} & ideal cut & 8.58 ks & -108 & 108 & 0.18 \\
     \rowcolor{cyan} & ideal energy & 8.58 ks & -44 & 126 & 0.133 \\
     \rowcolor{cyan} & ideal modularity & 8.58 ks & -108 & 108 & 0.18 \\
     \rowcolor{pink} & SNN \#0 & 10.37 ns & -96 & 100 & 0.166 \\
     \rowcolor{pink} & SNN \#1 & 10.37 ns & -96 & 100 & 0.166 \\
     \rowcolor{pink} & SNN \#2 & 10.37 ns & -100 & 103 & 0.172 \\ 
     
     %\addlinespace
     \rowcolor{yellow} \textbf{24} 
                       & metis & 1.36 ms  & -120 & 153 & 0.306  \\* % no page break at this line
     \rowcolor{yellow} & kernighan-lin & 15.03 ms & -120 & 153 & 0.306 \\
     \rowcolor{yellow} & girvan-newman & 113.37 ms & -104 & 142 & 0.272  \\ 
     \rowcolor{cyan} & ideal cut & 11.05 ks & -120 & 150 & 0.306  \\
     \rowcolor{cyan} & ideal energy & 11.05 ks & 76 & 178 & 0.125  \\
     \rowcolor{cyan} & ideal modularity & 11.05 ks & -120 & 150 & 0.306  \\ 
     \rowcolor{pink} & SNN \#0 & 1.44 ns & -84 & 160 & 0.234 \\ 
     \rowcolor{pink} & SNN \#1 & 1.44 ns & -104 & 163 & 0.287  \\ 
     \rowcolor{pink} & SNN \#2 & 1.44 ns & -116 & 157 & 0.3  \\ 
     \addlinespace 
     \rowcolor{yellow} \textbf{25}
                       & kernighan-lin & 56.65 ms & -131 & 121 & 0.202 \\
     \rowcolor{yellow} & girvan-newman & 547.38 ms & -135 & 120 & 0.209 \\
     \rowcolor{cyan} & ideal cut & 19.97 ks & -135 & 120 & 0.209 \\
     \rowcolor{cyan} & ideal energy & 19.97 ks & -59 & 138 & 0.147 \\
     \rowcolor{cyan} & ideal modularity & 19.97 ks & -135 & 120 & 0.209 \\
     \rowcolor{pink} & SNN \#0 & 11.25 ns & -107 & 106 & 0.184 \\
     \rowcolor{pink} & SNN \#1 & 11.25 ns & -103 & 106 & 0.177 \\
     \rowcolor{pink} & SNN \#2 & 11.25 ns & -107 & 106 & 0.184 \\
     \rowcolor{pink} & SNN \#3 & 11.25 ns &  -87 & 103 & 0.155 \\
     \rowcolor{pink} & SNN \#4 & 11.25 ns & -107 & 106 & 0.184 \\ 
     \addlinespace 
     \rowcolor{yellow} \textbf{35} 
                       & kernighan-lin & 1.66 ms & -233 & 324 & 0.294 \\
     \rowcolor{yellow} & girvan-newman & 584.88 ms & -185 & 364 & 0.274 \\
     \rowcolor{pink} & SNN \#0 & 22.05 ns & -157 & 269 & 0.269 \\
     \rowcolor{pink} & SNN \#1 & 22.05 ns &  -93 & 251 & 0.218 \\
     \rowcolor{pink} & SNN \#2 & 22.05 ns & -117 & 252 & 0.255 \\
     \rowcolor{pink} & SNN \#3 & 22.05 ns & -105 & 250 & 0.241 \\ 
     \addlinespace
     \rowcolor{yellow} \textbf{50}
                       & kernighan-lin & 2.02 ms & -356 & 770 & 0.348 \\
     \rowcolor{yellow} & girvan-newman & 776.80 ms & -8 & 556 & 0.269 \\
     \rowcolor{pink} & SNN \#0 & 45.00 ns &  92 & 522 & 0.240 \\
     \rowcolor{pink} & SNN \#1 & 45.00 ns & 108 & 520 & 0.225 \\
     \rowcolor{pink} & SNN \#2 & 45.00 ns &  68 & 545 & 0.200 \\ 
     \addlinespace
     \rowcolor{yellow} \textbf{50} 
                       & metis & 2.93 ms & -488 & 676 & 0.286 \\
     \rowcolor{yellow} & kernighan-lin & 2.65 ms & -480 & 669 & 0.286 \\
     \rowcolor{yellow} & girvan-newman & 3.15 s  & -424 & 604 & 0.273 \\
     \rowcolor{pink} & SNN \#0 & 45.00 ns & -400 &  592 & 0.266 \\
     \rowcolor{pink} & SNN \#1 & 45.00 ns & -444 &  611 & 0.282 \\ 

\end{longtable}

\end{document}
1
  • The colors were chosen arbitrarily and are used to distinguish between different groups of partition types (traditional, ideal, neurotrophic). This is explained in my paper but if you have suggestions of way to make this more clear in the table I'd love some suggestions even if it is just a different coloring scheme.
    – Sam Adler
    Apr 26, 2023 at 16:37
2

Long table should not be inserted in table float. It prevent table breaking over several pages.

A wee bit changed table design (column "Time" is replaced by two columns: S and s, used is tabularray package with booktabs and siunitx libraries (which load packages of the same names), table rows are terminated by\\* with exception, where break table between pages is allowed:


\documentclass{article} % or some other suitable document class
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
 \SetTblrStyle{contfoot}{font=\footnotesize\sffamily\itshape}
\NewColumnType{u}[1][]{Q[si={#1},l,cmd=\TblrUnit]}

\begin{document}

\begin{longtblr}[
caption = {Results from simulations.}, 
  label = {tab:results}
                ]{colspec = {l l
                             Q[si={table-format= 3.2{\,},
                               table-number-alignment=right}] @{} 
                              u % <---  for typing units, left aligned
                              S[table-format=-2.0]
                              S[table-format= 3.0]
                              S[table-format=-1.5,group-digits=false]
                            },
                  cell{2-Z}{1} = {font=\bfseries},
                  row{1}  = {guard},
                  rowsep = 0.25pt,
                  rowhead = 1,
                  }
% table body
\toprule
\# Nodes    
    & Partition Type    
        & \SetCell[c=2]{c} Time    
            &   & Cut   
                    & Energy    
                        & Modularity            \\ 
\midrule
% body of table
    \SetRow{bg=yellow} 
9   & kernighan-lin     & 473.26 & \micro\second &  -11 &  17 & 0.170 \\*
    \SetRow{bg=yellow}
    & girvan-newman     &   2.01 & \milli\second &   -7 &  20 & 0.180 \\*
    \SetRow{bg=cyan} 
    & ideal cut         &  46.04 & \milli\second &  -11 &  19 & 0.186 \\*
    \SetRow{bg=cyan} 
    & ideal energy      &  46.04 & \milli\second &   -7 &  20 & 0.180 \\*
    \SetRow{bg=cyan}
    & ideal modularity  &  46.04 & \milli\second &  -11 &  19 & 0.186 \\*
    \SetRow{bg=pink}
    & SNN \#0           &   1.46 & \nano\second  &   -7 &  15 & 0.125 \\*
    \SetRow{bg=pink}
    & SNN \#1           &   1.46 & \nano\second  &  -11 &  16 & 0.186 \\*
    \SetRow{bg=pink}
    & SNN \#2           &   1.46 & \nano\second  &  -11 &  17 & 0.170 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
18  & kernighan-lin     & 715.02 & \micro\second &  -60 &  83 & 0.284 \\*
    \SetRow{bg=yellow}
    & girvan-newman     &  29.86 & \milli\second &  -64 &  89 & 0.306 \\*
    \SetRow{bg=cyan}
    & ideal cut         &  72.48 & \second       &  -64 &  89 & 0.305 \\*
    \SetRow{bg=cyan}
    & ideal energy      &  72.48 & \second       &   32 & 101 & 0.149 \\*
    \SetRow{bg=cyan}
    & ideal modularity  &  72.48 & \second       &  -64 &  89 & 0.305 \\*
    \SetRow{bg=pink}
    & SNN \#0           &   5.83 & \nano\second  &  -32 &  67 & 0.245 \\*
    \SetRow{bg=pink}
    & SNN \#1           &   5.83 & \nano\second  &  -32 &  73 & 0.183 \\*
    \SetRow{bg=pink}
    & SNN \#2           &   5.83 & \nano\second  &  -36 &  73 & 0.208 \\*
    \SetRow{bg=pink}
    & SNN \#3           &   5.83 & \nano\second  &  -44 &  74 & 0.247 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow} \
20  & kernighan-lin     & 979.42 & \second       &  -74 &  85 & 0.203 \\*
    \SetRow{bg=yellow}
    & girvan-newman     &  44.43 & \milli\second &  -82 &  85 & 0.224 \\*
    \SetRow{bg=pink}
    & SNN \#0           &   7.20 & \nano\second  &  -42 &  67 & 0.170 \\*
    \SetRow{bg=pink}
    & SNN \#1           &   7.20 & \nano\second  &  -46 &  70 & 0.160 \\*
    \SetRow{bg=pink}
    & SNN \#2           &   7.20 & \nano\second  &  -58 &  74 & 0.184 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
22  & metis             &   1.64 & \milli\second &  -92 &  91 & 0.177 \\*
    \SetRow{bg=yellow}
    & kernighan-lin     &   1.61 & \milli\second &  -92 &  89 & 0.177 \\*
    \SetRow{bg=yellow}
    & girvan-newman     &  84.34 & \milli\second &  180 & 101 & -0.00296 \\*
    \SetRow{bg=cyan}
    & ideal cut         &   2.09 & \kilo\second  &  -92 &  93 & 0.178 \\*
    \SetRow{bg=cyan}
    & ideal energy      &   2.09 & \kilo\second  &  -36 & 101 & 0.124 \\*
    \SetRow{bg=cyan}
    & ideal modularity  &   2.09 & \kilo\second  &  -92 &  93 & 0.178 \\*
    \SetRow{bg=pink}
    & SNN \#0           &   8.71 & \nano\second  &  -76 &  81 & 0.152 \\*
    \SetRow{bg=pink}
    & SNN \#1           &   8.71 & \nano\second  &  -76 &  81 & 0.152 \\*
    \SetRow{bg=pink}
    & SNN \#2           &   8.71 & \nano\second  &  -88 &  88 & 0.169 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
24 & kernighan-lin      &   1.32 & \milli\second & -104 & 108 & 0.173 \\*
    \SetRow{bg=yellow}
    & girvan-newman     & 156.77 & \milli\second & -104 & 104 & 0.178 \\*
    \SetRow{bg=cyan}
    & ideal cut         &   8.58 & \kilo\second  & -108 & 108 &  0.18 \\*
    \SetRow{bg=cyan}
    & ideal energy      &   8.58 & \kilo\second  &  -44 & 126 & 0.133 \\*
    \SetRow{bg=cyan}
    & ideal modularity  &   8.58 & \kilo\second  & -108 & 108 &  0.18 \\*
    \SetRow{bg=pink}
    & SNN \#0           &  10.37 & \nano\second  &  -96 & 100 & 0.166 \\*
    \SetRow{bg=pink}
    & SNN \#1           &  10.37 & \nano\second  &  -96 & 100 & 0.166 \\*
    \SetRow{bg=pink}
    & SNN \#2           &  10.37 & \nano\second  & -100 & 103 & 0.172 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
24  & metis             &   1.36 & \milli\second & -120 & 153 & 0.306  \\* 
    \SetRow{bg=yellow}
    & kernighan-lin     &  15.03 & \milli\second & -120 & 153 & 0.306  \\*
    \SetRow{bg=yellow}
    & girvan-newman     & 113.37 & \milli\second & -104 & 142 & 0.272  \\*
    \SetRow{bg=cyan}
    & ideal cut         &  11.05 & \kilo\second  & -120 & 150 & 0.306  \\*
    \SetRow{bg=cyan}
    & ideal energy      &  11.05 & \kilo\second  &   76 & 178 & 0.125  \\*
    \SetRow{bg=cyan}
    & ideal modularity  &  11.05 & \kilo\second  & -120 & 150 & 0.306  \\*
    \SetRow{bg=pink}
    & SNN \#0           &   1.44 & \nano\second  &  -84 & 160 & 0.234 \\*
    \SetRow{bg=pink}
    & SNN \#1           &   1.44 & \nano\second  & -104 & 163 & 0.287 \\*
    \SetRow{bg=pink}
    & SNN \#2           &   1.44 & \nano\second  & -116 & 157 & 0.3  \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
25  & kernighan-lin     &  56.65 & \milli\second & -131 & 121 & 0.202 \\*
    \SetRow{bg=yellow}
    & girvan-newman     & 547.38 & \milli\second & -135 & 120 & 0.209 \\*
    \SetRow{bg=cyan}
    & ideal cut         &  19.97 & \kilo\second  & -135 & 120 & 0.209 \\*
    \SetRow{bg=cyan}
    & ideal energy      &  19.97 & \kilo\second  &  -59 & 138 & 0.147 \\*
    \SetRow{bg=cyan}
    & ideal modularity  &  19.97 & \kilo\second  & -135 & 120 & 0.209 \\*
    \SetRow{bg=pink}
    & SNN \#0           &  11.25 & \nano\second  & -107 & 106 & 0.184 \\*
    \SetRow{bg=pink}
    & SNN \#1           &  11.25 & \nano\second  & -103 & 106 & 0.177 \\*
    \SetRow{bg=pink}
    & SNN \#2           &  11.25 & \nano\second  & -107 & 106 & 0.184 \\*
    \SetRow{bg=pink}
    & SNN \#3           &  11.25 & \nano\second  &  -87 & 103 & 0.155 \\*
    \SetRow{bg=pink}
    & SNN \#4           &  11.25 & \nano\second  & -107 & 106 & 0.184 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
35  & kernighan-lin     &   1.66 & \milli\second & -233 & 324 & 0.294 \\*
    \SetRow{bg=yellow}
    & girvan-newman     & 584.88 & \milli\second & -185 & 364 & 0.274 \\*
    \SetRow{bg=pink}
    & SNN \#0           &  22.05 & \nano\second  & -157 & 269 & 0.269 \\*
    \SetRow{bg=pink}
    & SNN \#1           &  22.05 & \nano\second  &  -93 & 251 & 0.218 \\*
    \SetRow{bg=pink}
    & SNN \#2           &  22.05 & \nano\second  & -117 & 252 & 0.255 \\*
    \SetRow{bg=pink}
    & SNN \#3           &  22.05 & \nano\second  & -105 & 250 & 0.241 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
50  & kernighan-lin     &   2.02 & \milli\second & -356 & 770 & 0.348 \\*
    \SetRow{bg=yellow}
    & girvan-newman     & 776.80 & \milli\second &   -8 & 556 & 0.269 \\*
    \SetRow{bg=pink}
    & SNN \#0           &  45.00 & \nano\second  &  92 & 522 & 0.240 \\*
    \SetRow{bg=pink}
    & SNN \#1           &  45.00 & \nano\second  & 108 & 520 & 0.225 \\*
    \SetRow{bg=pink}
    & SNN \#2           &  45.00 & \nano\second  &  68 & 545 & 0.200 \\
\midrule[3pt, fg=white]
    \SetRow{bg=yellow}
50 & metis              &   2.93 & \milli\second & -488 & 676 & 0.286 \\
    \SetRow{bg=yellow}
    & kernighan-lin     &   2.65 & \milli\second & -480 & 669 & 0.286 \\
    \SetRow{bg=yellow}
    & girvan-newman     &   3.15 & \second       & -424 & 604 & 0.273 \\
    \SetRow{bg=pink}
    & SNN \#0           &  45.00 & \nano\second  & -400 & 592 & 0.266 \\
    \SetRow{bg=pink}
    & SNN \#1           & 45.00 & \nano\second   & -444 & 611 & 0.282 \\
\end{longtblr}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .