Skip to content

Commit 4adc91b

Browse files
authored
Feature&Docs: support the indent control on FmtTable (#6055)
* Feature&Docs: support the indent control on FmtTable * update the annotation of constructor
1 parent 2e13f9f commit 4adc91b

File tree

10 files changed

+143
-35
lines changed

10 files changed

+143
-35
lines changed

source/module_base/formatter.h

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,22 @@ class FmtTable
191191
*
192192
* @param titles titles, its size should be the same as the number of columns
193193
* @param nrows number of rows
194-
* @param aligns Alignments instance, can be constructed with initializer_list<char> like {'r', 'c'}, for right and center alignment for values and titles
194+
* @param fmts format strings for each column, its size should be the same as the number of columns
195+
* @param indent indent for each column, default is 0
196+
* @param aligns Alignments instance, for alignment of values and titles, e.g. {Align::LEFT, Align::RIGHT} for left alignment of values and right alignment of titles
195197
* @param frames Frames instance, can be constructed with initializer_list<char> like {'-', '-', '-', ' ', ' '}, for up, middle, down, left and right frames
196198
* @param delimiters Delimiters instance, can be constructed with initializer_list<char> like {'-', ' '}, for horizontal and vertical delimiters
197199
*/
198200
FmtTable(const std::vector<std::string>& titles,
199-
const size_t& nrows,
201+
const size_t nrows,
200202
const std::vector<std::string>& fmts,
203+
const size_t indent = 0,
201204
const Alignments& aligns = {},
202205
const Frames& frames = {},
203-
const Delimiters& delimiters = {}): titles_(titles), data_(nrows, titles.size()), fmts_(fmts), aligns_(aligns), frames_(frames), delimiters_(delimiters)
204-
{ assert(titles.size() == fmts.size()); };
206+
const Delimiters& delimiters = {}):
207+
titles_(titles), data_(nrows, titles.size()), // data
208+
fmts_(fmts), indent_(indent), aligns_(aligns), frames_(frames), delimiters_(delimiters) // styles
209+
{ assert(titles.size() == fmts.size()||titles.size() == 0); };
205210
~FmtTable() {};
206211
/**
207212
* @brief import data from std::vector
@@ -269,22 +274,24 @@ class FmtTable
269274
*/
270275
std::string concat_title(const std::vector<std::string>& titles) const
271276
{
272-
std::string dst;
277+
std::string dst = "";
273278
// first sum width of all titles
274279
size_t width = std::accumulate(titles.begin(), titles.end(), 0, [](const size_t& acc, const std::string& s) { return acc + s.size(); });
275280
// add width of delimiters
276281
width += titles.size() - 1;
277282
// add width of left and right frames
278283
width += 2;
279-
dst += std::string(width, frames_.up_) + "\n" + std::string(1, frames_.l_);
284+
dst += std::string(indent_, ' ') + std::string(width, frames_.up_) + "\n"; // first line: the upper frame
285+
dst += std::string(indent_, ' ') + std::string(1, frames_.l_); // second line: the left frame + titles + right frame
280286
for(size_t i = 0; i < titles.size(); i++)
281287
{
282288
dst += titles[i];
283289
if (i != titles.size() - 1) {
284290
dst += delimiters_.v_;
285291
}
286292
}
287-
dst += std::string(1, frames_.r_) + "\n" + std::string(width, frames_.mid_) + "\n";
293+
dst += std::string(1, frames_.r_) + "\n";
294+
dst += std::string(indent_, ' ') + std::string(width, frames_.mid_) + "\n"; // third line: the middle frame
288295
return dst;
289296
}
290297
/**
@@ -303,10 +310,10 @@ class FmtTable
303310
width += row.size() - 1;
304311
// for the left and right frame
305312
width += 2;
306-
if (pos == 't') {
307-
dst += std::string(width, frames_.up_) + "\n";
313+
if (pos == 't') { // 't' for top
314+
dst += std::string(indent_, ' ') + std::string(width, frames_.up_) + "\n";
308315
}
309-
dst += std::string(1, frames_.l_);
316+
dst += std::string(indent_, ' ') + std::string(1, frames_.l_);
310317
for(size_t i = 0; i < row.size(); i++)
311318
{
312319
dst += row[i];
@@ -315,8 +322,8 @@ class FmtTable
315322
}
316323
}
317324
dst += std::string(1, frames_.r_) + "\n";
318-
if (pos == 'b') {
319-
dst += std::string(width, frames_.dw_) + "\n";
325+
if (pos == 'b') { // 'b' for bottom
326+
dst += std::string(indent_, ' ') + std::string(width, frames_.dw_) + "\n"; // the last line
320327
}
321328
return dst;
322329
}
@@ -397,6 +404,7 @@ class FmtTable
397404
std::vector<std::string> titles_;
398405
NDArray<std::string> data_; // data
399406
std::vector<std::string> fmts_; // format strings for each column
407+
size_t indent_ = 0; // indent for each column
400408
};
401409

402410
#endif

source/module_base/test/formatter_test.cpp

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,28 @@ TEST(FormatterTest, FmtTableDefaultArgs)
217217
EXPECT_EQ(result, ref);
218218
}
219219

220+
TEST(FormatterTest, FmtTableHeadless)
221+
{
222+
const std::vector<std::string> titles = {"", "", ""};
223+
const std::vector<std::string> fmts = {"%s", "%d", "%f"};
224+
FmtTable table(titles, 5, fmts);
225+
const std::vector<std::string> col1 = {"row1", "row2", "row3", "row4", "row5"};
226+
const std::vector<int> col2 = {1, 2, 3, 4, 5};
227+
const std::vector<float> col3 = {1.1, 2.2, 3.3, 4.4, 5.5};
228+
table << col1 << col2 << col3;
229+
const std::string result = table.str();
230+
std::cout << result << std::endl;
231+
std::string ref = "";
232+
ref += "-----------------\n";
233+
ref += " row1 1 1.100000 \n";
234+
ref += " row2 2 2.200000 \n";
235+
ref += " row3 3 3.300000 \n";
236+
ref += " row4 4 4.400000 \n";
237+
ref += " row5 5 5.500000 \n";
238+
ref += "-----------------\n";
239+
EXPECT_EQ(result, ref);
240+
}
241+
220242
TEST(FormatterTest, FmtTableCustomArgsAlign)
221243
{
222244
// shared data
@@ -226,7 +248,7 @@ TEST(FormatterTest, FmtTableCustomArgsAlign)
226248
std::vector<int> col2 = {1, 2, 3, 4, 5};
227249
std::vector<float> col3 = {1.1, 2.2, 3.3, 4.4, 5.5};
228250
// align: l and l
229-
FmtTable table(titles, 5, fmts, {FmtTable::Align::LEFT, FmtTable::Align::LEFT});
251+
FmtTable table(titles, 5, fmts, 0, {FmtTable::Align::LEFT, FmtTable::Align::LEFT});
230252
table << col1 << col2 << col3;
231253
std::string result = table.str();
232254
std::cout << result << std::endl;
@@ -243,7 +265,7 @@ TEST(FormatterTest, FmtTableCustomArgsAlign)
243265
EXPECT_EQ(result, ref);
244266

245267
// align: r and r
246-
FmtTable table2(titles, 5, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::RIGHT});
268+
FmtTable table2(titles, 5, fmts, 0, {FmtTable::Align::RIGHT, FmtTable::Align::RIGHT});
247269
table2 << col1 << col2 << col3;
248270
result = table2.str();
249271
std::cout << result << std::endl;
@@ -260,7 +282,7 @@ TEST(FormatterTest, FmtTableCustomArgsAlign)
260282
EXPECT_EQ(result, ref);
261283

262284
// align: l and r
263-
FmtTable table3(titles, 5, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
285+
FmtTable table3(titles, 5, fmts, 0, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
264286
table3 << col1 << col2 << col3;
265287
result = table3.str();
266288
std::cout << result << std::endl;
@@ -277,7 +299,7 @@ TEST(FormatterTest, FmtTableCustomArgsAlign)
277299
EXPECT_EQ(result, ref);
278300

279301
// align: r and l
280-
FmtTable table4(titles, 5, fmts, {FmtTable::Align::LEFT, FmtTable::Align::RIGHT});
302+
FmtTable table4(titles, 5, fmts, 0, {FmtTable::Align::LEFT, FmtTable::Align::RIGHT});
281303
table4 << col1 << col2 << col3;
282304
result = table4.str();
283305
std::cout << result << std::endl;
@@ -303,7 +325,12 @@ TEST(FormatterTest, FmtTableCustomArgsAlignFrame)
303325
std::vector<int> col2 = {1, 2, 3, 4, 5};
304326
std::vector<float> col3 = {1.1, 2.2, 3.3, 4.4, 5.5};
305327

306-
FmtTable table1(titles, 5, fmts, {FmtTable::Align::LEFT, FmtTable::Align::LEFT}, {'+', '?', '*', '.', '^'});
328+
FmtTable table1(titles,
329+
5,
330+
fmts,
331+
0,
332+
{FmtTable::Align::LEFT, FmtTable::Align::LEFT},
333+
{'+', '?', '*', '.', '^'});
307334
table1 << col1 << col2 << col3;
308335
std::string result = table1.str();
309336
std::cout << result << std::endl;
@@ -328,7 +355,10 @@ TEST(FormatterTest, FmtTableCustomArgsAlignFrameDelim)
328355
std::vector<std::string> col1 = {"row1", "row2", "row3", "row4", "row5"};
329356
std::vector<int> col2 = {1, 2, 3, 4, 5};
330357
std::vector<float> col3 = {1.1, 2.2, 3.3, 4.4, 5.5};
331-
FmtTable table1(titles, 5, fmts,
358+
FmtTable table1(titles,
359+
5,
360+
fmts,
361+
0,
332362
{FmtTable::Align::LEFT, FmtTable::Align::LEFT},
333363
{'=', '/', '&', '#', '%'},
334364
{'"', ']'});
@@ -348,6 +378,30 @@ TEST(FormatterTest, FmtTableCustomArgsAlignFrameDelim)
348378
EXPECT_EQ(result, ref);
349379
}
350380

381+
TEST(FormatterTest, FmtTableCustomIndent)
382+
{
383+
const std::vector<std::string> titles = {"title1", "t i t l e 2", "t-i-t-l-e-3"};
384+
const std::vector<std::string> fmts = {"%s", "%d", "%f"};
385+
FmtTable table(titles, 5, fmts, 4);
386+
const std::vector<std::string> col1 = {"row1", "row2", "row3", "row4", "row5"};
387+
const std::vector<int> col2 = {1, 2, 3, 4, 5};
388+
const std::vector<float> col3 = {1.1, 2.2, 3.3, 4.4, 5.5};
389+
table << col1 << col2 << col3;
390+
const std::string result = table.str();
391+
std::cout << result << std::endl;
392+
std::string ref = "";
393+
ref += " --------------------------------\n";
394+
ref += " title1 t i t l e 2 t-i-t-l-e-3 \n";
395+
ref += " --------------------------------\n";
396+
ref += " row1 1 1.100000 \n";
397+
ref += " row2 2 2.200000 \n";
398+
ref += " row3 3 3.300000 \n";
399+
ref += " row4 4 4.400000 \n";
400+
ref += " row5 5 5.500000 \n";
401+
ref += " --------------------------------\n";
402+
EXPECT_EQ(result, ref);
403+
}
404+
351405
int main(int argc, char** argv) {
352406
::testing::InitGoogleTest(&argc, argv);
353407
return RUN_ALL_TESTS();

source/module_base/timer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ void timer::print_all(std::ofstream &ofs)
300300

301301
std::vector<std::string> titles = {"CLASS_NAME", "NAME", "TIME/s", "CALLS", "AVG/s", "PER/%"};
302302
std::vector<std::string> formats = {"%-10s", "%-10s", "%6.2f", "%8d", "%6.2f", "%6.2f"};
303-
FmtTable time_statistics(titles, pers.size(), formats, {FmtTable::Align::LEFT, FmtTable::Align::CENTER});
303+
FmtTable time_statistics(/*titles=*/titles,
304+
/*nrows=*/pers.size(),
305+
/*formats=*/formats,
306+
/*indent=*/0,
307+
/*align=*/{/*value*/FmtTable::Align::LEFT, /*title*/FmtTable::Align::CENTER});
304308
time_statistics << class_names << names << times << calls << avgs << pers;
305309
const std::string table = "TIME STATISTICS\n" + time_statistics.str();
306310
std::cout<<table<<std::endl;

source/module_elecstate/elecstate_print.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,11 @@ void print_etot(const Magnetism& magnet,
430430
std::transform(energies_Ry.begin(), energies_Ry.end(), energies_eV.begin(), [](double ener) {
431431
return ener * ModuleBase::Ry_to_eV;
432432
});
433-
FmtTable table({"Energy", "Rydberg", "eV"},
434-
titles.size(),
435-
{"%-14s", "%20.10f", "%20.10f"},
436-
{FmtTable::Align::LEFT, FmtTable::Align::CENTER});
433+
FmtTable table(/*titles=*/{"Energy", "Rydberg", "eV"},
434+
/*nrows=*/titles.size(),
435+
/*formats=*/{"%-14s", "%20.10f", "%20.10f"},
436+
/*indents=*/0,
437+
/*align=*/{/*value*/FmtTable::Align::LEFT, /*title*/FmtTable::Align::CENTER});
437438
table << titles << energies_Ry << energies_eV;
438439
GlobalV::ofs_running << table.str() << std::endl;
439440
if (PARAM.inp.out_level == "ie" || PARAM.inp.out_level == "m") // xiaohui add 'm' option, 2015-09-16

source/module_esolver/esolver_of_tool.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ void ESolver_OF::print_info(const bool conv_esolver)
528528
std::transform(energies_Ry.begin(), energies_Ry.end(), energies_eV.begin(), [](double energy) {
529529
return energy * ModuleBase::Ry_to_eV;
530530
});
531-
FmtTable table({"Energy", "Rydberg", "eV"}, titles.size(), {"%20s", "%20.12f", "%20.12f"});
531+
FmtTable table(/*titles=*/{"Energy", "Rydberg", "eV"},
532+
/*nrows=*/titles.size(),
533+
/*formats=*/{"%20s", "%20.12f", "%20.12f"}, 0);
532534
table << titles << energies_Ry << energies_eV;
533535
GlobalV::ofs_running << table.str() << std::endl;
534536
}

source/module_hamilt_general/module_vdw/vdwd3_autoset_xcparam.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,10 @@ void vdw::Vdwd3Parameters::_vdwd3_autoset_xcparam(const std::string& xc_in,
493493
if (plog != nullptr) // logging the autoset
494494
{
495495
param = {s6, s8, a1, a2};
496-
FmtTable vdwd3tab({"Parameters", "Original", "Autoset"}, 4, {"%10s", "%10s", "%10.4f"});
496+
FmtTable vdwd3tab(/*titles=*/{"Parameters", "Original", "Autoset"},
497+
/*nrows=*/4,
498+
/*formats=*/{"%10s", "%10s", "%10.4f"},
499+
/*indent=*/0);
497500
const std::vector<std::string> items = {"s6", "s8", "a1", "a2"};
498501
vdwd3tab << items << flag << param;
499502
(*plog) << "\nDFT-D3 Dispersion correction parameters autoset\n" << vdwd3tab.str()

source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,11 @@ void SpinConstrain<FPTYPE>::print_Mi(std::ofstream& ofs_running)
523523
{
524524
const std::vector<std::string> title = {"Total Magnetism (uB)", ""};
525525
const std::vector<std::string> fmts = {"%-26s", "%20.10f"};
526-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
526+
FmtTable table(/*titles=*/title,
527+
/*nrows=*/nat,
528+
/*formats=*/fmts,
529+
/*indent=*/0,
530+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
527531
for (int iat = 0; iat < nat; ++iat)
528532
{
529533
mag_z[iat] = Mi_[iat].z;
@@ -535,7 +539,11 @@ void SpinConstrain<FPTYPE>::print_Mi(std::ofstream& ofs_running)
535539
{
536540
const std::vector<std::string> title = {"Total Magnetism (uB)", "", "", ""};
537541
const std::vector<std::string> fmts = {"%-26s", "%20.10f", "%20.10f", "%20.10f"};
538-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
542+
FmtTable table(/*titles=*/title,
543+
/*nrows=*/nat,
544+
/*formats=*/fmts,
545+
/*indent=*/0,
546+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
539547
for (int iat = 0; iat < nat; ++iat)
540548
{
541549
mag_x[iat] = Mi_[iat].x;
@@ -560,7 +568,11 @@ void SpinConstrain<FPTYPE>::print_Mag_Force(std::ofstream& ofs_running)
560568
{
561569
const std::vector<std::string> title = {"Magnetic force (eV/uB)", ""};
562570
const std::vector<std::string> fmts = {"%-26s", "%20.10f"};
563-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
571+
FmtTable table(/*titles=*/title,
572+
/*nrows=*/nat,
573+
/*formats=*/fmts,
574+
/*indent=*/0,
575+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
564576
for (int iat = 0; iat < nat; ++iat)
565577
{
566578
mag_force_z[iat] = lambda_[iat].z * ModuleBase::Ry_to_eV;
@@ -572,7 +584,11 @@ void SpinConstrain<FPTYPE>::print_Mag_Force(std::ofstream& ofs_running)
572584
{
573585
const std::vector<std::string> title = {"Magnetic force (eV/uB)", "", "", ""};
574586
const std::vector<std::string> fmts = {"%-26s", "%20.10f", "%20.10f", "%20.10f"};
575-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
587+
FmtTable table(/*titles=*/title,
588+
/*nrows=*/nat,
589+
/*formats=*/fmts,
590+
/*indent=*/0,
591+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
576592
for (int iat = 0; iat < nat; ++iat)
577593
{
578594
mag_force_x[iat] = lambda_[iat].x * ModuleBase::Ry_to_eV;

source/module_hamilt_pw/hamilt_pwdft/onsite_projector.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,11 @@ void projectors::OnsiteProjector<T, Device>::cal_occupations(const psi::Psi<std:
590590
const std::vector<std::string> title = {"Total Magnetism (uB)", "", "", ""};
591591
const std::vector<std::string> fmts = {"%-26s", "%20.10f", "%20.10f", "%20.10f"};
592592
const std::vector<std::string> orb_names = {"s", "p", "d", "f", "g"};
593-
FmtTable table(title, this->ucell->nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
593+
FmtTable table(/*titles=*/title,
594+
/*nrows=*/this->ucell->nat,
595+
/*formats=*/fmts,
596+
/*indent=*/0,
597+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
594598
// parameters for mag output
595599
int occ_index = 0;
596600
for(int iat=0;iat<this->ucell->nat;iat++)

source/module_io/output_log.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ void print_force(std::ofstream& ofs_running,
242242
}
243243
}
244244

245-
FmtTable fmt(titles, atom_label.size(), {"%10s", "%20.10f", "%20.10f", "%20.10f"});
245+
FmtTable fmt(/*titles=*/titles,
246+
/*nrows=*/atom_label.size(),
247+
/*formats=*/{"%10s", "%20.10f", "%20.10f", "%20.10f"}, 0);
246248
fmt << atom_label << force_x << force_y << force_z;
247249
table = fmt.str();
248250
ofs_running << table << std::endl;
@@ -283,7 +285,9 @@ void print_stress(const std::string& name, const ModuleBase::matrix& scs, const
283285

284286
double pressure = (scs(0, 0) + scs(1, 1) + scs(2, 2)) / 3.0 * unit_transform;
285287

286-
FmtTable fmt(titles, 3, {"%20.10f", "%20.10f", "%20.10f"});
288+
FmtTable fmt(/*titles=*/titles,
289+
/*nrows=*/3,
290+
/*formats=*/{"%20.10f", "%20.10f", "%20.10f"}, 0);
287291
fmt << stress_x << stress_y << stress_z;
288292
table = fmt.str();
289293
GlobalV::ofs_running << table;

source/module_io/output_mulliken.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,11 @@ void Output_Mulliken<TK>::print_atom_mag(const std::vector<std::vector<double>>&
440440
{
441441
const std::vector<std::string> title = {"Total Magnetism (uB)", ""};
442442
const std::vector<std::string> fmts = {"%-26s", "%20.10f"};
443-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::LEFT});
443+
FmtTable table(/*titles=*/title,
444+
/*nrows=*/nat,
445+
/*formats=*/fmts,
446+
/*indent=*/0,
447+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::LEFT});
444448
for (int iat = 0; iat < nat; ++iat)
445449
{
446450
atom_label.push_back(this->cell_index_->get_atom_label(iat, true));
@@ -456,7 +460,11 @@ void Output_Mulliken<TK>::print_atom_mag(const std::vector<std::vector<double>>&
456460
std::vector<double> azimuth(nat, 0.0);
457461
const std::vector<std::string> title = {"Total Magnetism (uB)", "x", "y", "z"};
458462
const std::vector<std::string> fmts = {"%26s", "%20.10f", "%20.10f", "%20.10f"};
459-
FmtTable table(title, nat, fmts, {FmtTable::Align::RIGHT, FmtTable::Align::RIGHT});
463+
FmtTable table(/*titles=*/title,
464+
/*nrows=*/nat,
465+
/*formats=*/fmts,
466+
/*indent=*/0,
467+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::RIGHT});
460468
for (int iat = 0; iat < nat; ++iat)
461469
{
462470
atom_label.push_back(this->cell_index_->get_atom_label(iat, true));
@@ -472,7 +480,11 @@ void Output_Mulliken<TK>::print_atom_mag(const std::vector<std::vector<double>>&
472480
/// output mag in polar coordinates
473481
const std::vector<std::string> title_polar = {"Total Magnetism (uB)", "Magnitude (uB)", "Polar (degree)", "Azimuth (degree)"};
474482
const std::vector<std::string> fmts_polar = {"%26s", "%20.10f", "%20.10f", "%20.10f"};
475-
FmtTable table_polar(title_polar, nat, fmts_polar, {FmtTable::Align::RIGHT, FmtTable::Align::RIGHT});
483+
FmtTable table_polar(/*titles=*/title_polar,
484+
/*nrows=*/nat,
485+
/*formats=*/fmts_polar,
486+
/*indent=*/0,
487+
/*align=*/{/*value*/FmtTable::Align::RIGHT, /*title*/FmtTable::Align::RIGHT});
476488
table_polar << atom_label << magnitude << polar << azimuth;
477489
os << table_polar.str() << std::endl;
478490
}

0 commit comments

Comments
 (0)