This file is indexed.

/usr/include/spooles/Chv/Chv.h is in libspooles-dev 2.2-10build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
/*  Chv.h  */

#include "../SubMtx.h"
#include "../PatchAndGoInfo.h"
#include "../cfiles.h"

/*--------------------------------------------------------------------*/
/*
   --------------------------------------------------------------------
   basic chevron object, double complex

   id      -- object's id
   nD      -- number of rows and columns in the diagonal (1,1) block
   nL      -- number of rows in the lower (2,1) block
   nU      -- number of columns in the upper (1,2) block
   type    -- type of chevron
      SPOOLES_REAL    --> chevron has real entries
      SPOOLES_COMPLEX --> chevron has complex entries
   symflag -- symmetry flag
      SPOOLES_SYMMETRIC    --> chevron is symmetric
      SPOOLES_HERMITIAN    --> chevron is hermitian
      SPOOLES_NONSYMMETRIC --> chevron is nonsymmetric
   rowind  -- pointer to the row indices
   colind  -- pointer to the column indices
   entries -- pointer to the entries
   wrkDV   -- working storage DV object
   next    -- next Chv in a singly linked list
   --------------------------------------------------------------------
*/
typedef struct _Chv   Chv ;
struct _Chv {
   int      id       ;
   int      nD       ;
   int      nL       ;
   int      nU       ;
   int      type     ;
   int      symflag  ;
   int      *rowind  ;
   int      *colind  ;
   double   *entries ;
   DV       wrkDV    ;
   Chv      *next    ;
} ;
#define CHV_IS_REAL(chv)         ((chv)->type    == SPOOLES_REAL)
#define CHV_IS_COMPLEX(chv)      ((chv)->type    == SPOOLES_COMPLEX)
#define CHV_IS_SYMMETRIC(chv)    ((chv)->symflag == SPOOLES_SYMMETRIC)
#define CHV_IS_HERMITIAN(chv)    ((chv)->symflag == SPOOLES_HERMITIAN)
#define CHV_IS_NONSYMMETRIC(chv) ((chv)->symflag == SPOOLES_NONSYMMETRIC)
/*
   -------------------------------------------------
   example of storage layout for indices and entries 

   nonsymmetric case, nD = 6, nL = 4, nU = 5
   +---------------------------------------+
   |      10 11 12 13 14 15 16 17 18 19 20 |
   |   +-----------------------------------+
   |   | +---------------------------------+
   | 9 | | 9 10 11 12 13 14 15 16 17 18 19 |
   | 8 | | 8 28 29 30 31 32 33 34 35 36 37 |
   | 7 | | 7 27 45 46 47 48 49 50 51 52 53 |
   | 6 | | 6 26 44 60 61 62 63 64 65 66 67 |
   | 5 | | 5 25 43 59 73 74 75 76 77 78 79 |
   | 4 | | 4 24 42 58 72 84 85 86 87 88 89 |
   | 3 | | 3 23 41 57 71 83 +--------------+
   | 2 | | 2 22 40 56 70 82 |
   | 1 | | 1 21 39 55 69 81 |
   | 0 | | 0 20 38 54 68 80 |
   +---+ +------------------+

   symmetric case, nD = 6, nU = 5
         +---------------------------------+
         | 0  1  2  3  4  5  6  7  8  9 10 |
         +---------------------------------+
         +---------------------------------+
         | 0  1  2  3  4  5  6  7  8  9 10 |
         |   11 12 13 14 15 16 17 18 19 20 |
         |      21 22 23 44 25 26 27 28 29 |
         |         30 31 32 33 34 35 36 37 |
         |            38 39 40 41 42 43 44 |
         |               45 46 47 48 49 50 |
         +---------------------------------+
   -------------------------------------------------
*/
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in basics.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------
   simplest constructor
 
   created -- 98apr30, cca
   -----------------------
*/
Chv *
Chv_new ( 
   void 
) ;
/*
   -----------------------
   set the default fields
 
   created -- 98apr30, cca
   -----------------------
*/
void
Chv_setDefaultFields (
   Chv   *chv
) ;
/*
   --------------------------------------------------
   clear the data fields, releasing allocated storage
 
   created -- 98apr30, cca
   --------------------------------------------------
*/
void
Chv_clearData (
   Chv   *chv
) ;
/*
   ------------------------------------------
   destructor, free's the object and its data
 
   created -- 98apr30, cca
   ------------------------------------------
*/
void
Chv_free (
   Chv   *chv
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in init.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------------
   return the number of bytes needed to store the chevron
 
   created -- 98apr30, cca
   ------------------------------------------------------
*/
int
Chv_nbytesNeeded (
   int   nD,
   int   nL,
   int   nU,
   int   type,
   int   symflag
) ;
/*
   ----------------------------------------------------------------
   return the number of bytes in the workspace owned by this object
 
   created -- 98apr30, cca
   ----------------------------------------------------------------
*/
int
Chv_nbytesInWorkspace (
   Chv   *chv
) ;
/*
   ----------------------------------------------------------------
   set the number of bytes in the workspace owned by this object
 
   created -- 98apr30, cca
   ----------------------------------------------------------------
*/
void
Chv_setNbytesInWorkspace (
   Chv   *chv,
   int    nbytes
) ;
/*
   ----------------------------
   purpose -- set the fields
 
   created -- 98apr30, cca
   ----------------------------
*/
void
Chv_setFields (
   Chv     *chv,
   int      id,
   int      nD,
   int      nL,
   int      nU,
   int      type,
   int      symflag
) ;
/*
   ----------------------------
   purpose -- basic initializer
 
   created -- 98apr30, cca
   ----------------------------
*/
void
Chv_init (
   Chv     *chv,
   int      id,
   int      nD,
   int      nL,
   int      nU,
   int      type,
   int      symflag
) ;
/*
   ------------------------------------
   purpose -- initializer with pointers
 
   created -- 98apr30, cca
   ------------------------------------
*/
void
Chv_initWithPointers (
   Chv     *chv,
   int      id,
   int      nD,
   int      nL,
   int      nU,
   int      type,
   int      symflag,
   int      *rowind,
   int      *colind,
   double   *entries
) ;
/*
   -------------------------------------------------------------
   purpose -- to initialize the object from its working storage,
              used when the object is an MPI message
 
   created -- 98apr30
   -------------------------------------------------------------
*/
void
Chv_initFromBuffer (
   Chv   *chv
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in instance.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   ----------------------------
   return the id of the chevron
 
   created -- 98apr30, cca
   ----------------------------
*/
int
Chv_id (
   Chv   *chv
) ;
/*
   ------------------------------------------------------------
   return the type of the chevron
   return value = SPOOLES_REAL    --> chevron is real
   return value = SPOOLES_COMPLEX --> chevron is complex
 
   created -- 98apr30, cca
   ------------------------------------------------------------
*/
int
Chv_type (
   Chv   *chv
) ;
/*
   ---------------------------------------------------------------
   return the symmetry flag of the chevron
   return value = SPOOLES_SYMMETRIC --> chevron is symmetric
   return value = SPOOLES_HERMITIAN --> chevron is hermitian
   return value = SPOOLES_NONSYMMETRIC --> chevron is nonsymmetric
 
   created -- 98apr30, cca
   ---------------------------------------------------------------
*/
int
Chv_symmetryFlag (
   Chv   *chv
) ;
/*
   --------------------------------------------------
   fill *pnD with nD, *pnL with nL, and *pnU with nU.
 
   created -- 98apr30, cca
   --------------------------------------------------
*/
void
Chv_dimensions (
   Chv   *chv,
   int    *pnD,
   int    *pnL,
   int    *pnU
) ;
/*
   ----------------------------------------------
   fill *pnrow with nD + nL, *prowind with rowind
 
   created -- 98apr30, cca
   ----------------------------------------------
*/
void
Chv_rowIndices (
   Chv   *chv,
   int    *pnrow,
   int    **prowind
) ;
/*
   ----------------------------------------------
   fill *pncol with nD + nU, *pcolind with colind
 
   created -- 98apr30, cca
   ----------------------------------------------
*/
void
Chv_columnIndices (
   Chv   *chv,
   int    *pncol,
   int    **pcolind
) ;
/*
   ----------------------------
   return the number of entries
 
   created -- 98apr30, cca
   ----------------------------
*/
int
Chv_nent (
   Chv   *chv
) ;
/*
   --------------------------------------------
   fill *pentries with a pointer to the entries
 
   created -- 98apr30, cca
   --------------------------------------------
*/
double *
Chv_entries(
   Chv   *chv
) ;
/*
   -----------------------------------------
   return the location of the diagonal entry
   for the ichv'th chevron
 
   created -- 98apr30, cca
   -----------------------------------------
*/
double *
Chv_diagLocation(
   Chv   *chv,
   int    ichv
) ;
/*
   ----------------------------------------------
   return a pointer to the start of the workspace
 
   created -- 98apr30, cca
   ----------------------------------------------
*/
void *
Chv_workspace(
   Chv   *chv
) ;
/*
   ------------------------------------
   fill *pValue with entry (irow, jcol)
 
   created -- 98apr30, cca
   ------------------------------------
*/
void
Chv_realEntry (
   Chv      *chv,
   int      irow,
   int      jcol,
   double   *pValue
) ;
/*
   --------------------------------------------
   fill (*pReal,*pImag) with entry (irow, jcol)
 
   created -- 98apr30, cca
   --------------------------------------------
*/
void
Chv_complexEntry (
   Chv     *chv,
   int      irow,
   int      jcol,
   double   *pReal,
   double   *pImag
) ;
/*
   -----------------------------------------------------
   fill *ppValue with the location of entry (irow, jcol)
 
   created -- 98apr30, cca
   -----------------------------------------------------
*/
void
Chv_locationOfRealEntry (
   Chv      *chv,
   int      irow,
   int      jcol,
   double   **ppValue
) ;
/*
   ----------------------------------------------------------
   fill (*ppReal,*ppImag) with location of entry (irow, jcol)
 
   created -- 98apr30, cca
   ----------------------------------------------------------
*/
void
Chv_locationOfComplexEntry (
   Chv     *chv,
   int      irow,
   int      jcol,
   double   **ppReal,
   double   **ppImag
) ;
/*
   ------------------------------------
   set entry (irow, jcol) to value
 
   created -- 98apr30, cca
   ------------------------------------
*/
void
Chv_setRealEntry (
   Chv      *chv,
   int      irow,
   int      jcol,
   double   value
) ;
/*
   --------------------------------------------
   fill (*pReal,*pImag) with entry (irow, jcol)
 
   created -- 98apr30, cca
   --------------------------------------------
*/
void
Chv_setComplexEntry (
   Chv     *chv,
   int      irow,
   int      jcol,
   double   real,
   double   imag
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in update.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
   ---------------------------------------------------------------------
   purpose --  perform the hermitian factor update
     T_{\bnd{I} \cap J, \bnd{I} \cap J}
          -= U_{I, \bnd{I} \cap J}^H D_{I, I} U_{I, \bnd{I} \cap J}
   and
     T_{\bnd{I} \cap J, \bnd{I} \cap \bnd{J}}
         -= U_{I, \bnd{I} \cap J}^H D_{I, I} U_{I, \bnd{I} \cap \bnd{J}}
 
   created -- 98apr17, cca
   ---------------------------------------------------------------------
*/
void
Chv_updateH (
   Chv      *chvT,
   SubMtx   *mtxD,
   SubMtx   *mtxU,
   DV       *tempDV
) ;
/*
   ---------------------------------------------------------------------
   purpose --  perform the symmetric factor update
     T_{\bnd{I} \cap J, \bnd{I} \cap J}
          -= U_{I, \bnd{I} \cap J}^T D_{I, I} U_{I, \bnd{I} \cap J}
   and
     T_{\bnd{I} \cap J, \bnd{I} \cap \bnd{J}}
         -= U_{I, \bnd{I} \cap J}^T D_{I, I} U_{I, \bnd{I} \cap \bnd{J}}
 
   created -- 98apr17, cca
   ---------------------------------------------------------------------
*/
void
Chv_updateS (
   Chv      *chvT,
   SubMtx   *mtxD,
   SubMtx   *mtxU,
   DV       *tempDV
) ;
/*
   ---------------------------------------------------------------------
   purpose --  perform the nonsymmetric factor update
     T_{\bnd{I} \cap J, \bnd{I} \cap J}
          -= L_{\bnd{I} \cap J, I} D_{I, I} U_{I, \bnd{I} \cap J}
   and
     T_{\bnd{I} \cap J, \bnd{I} \cap \bnd{J}}
         -= L_{\bnd{I} \cap J, I} D_{I, I} U_{I, \bnd{I} \cap \bnd{J}}
   and
     T_{\bnd{I} \cap \bnd{J}, \bnd{I} \cap J}
         -= L_{\bnd{I} \cap \bnd{J}, I} D_{I, I} U_{I, \bnd{I} \cap J}
 
   created -- 98feb27, cca
   ---------------------------------------------------------------------
*/
void
Chv_updateN (
   Chv   *chvT,
   SubMtx   *mtxL,
   SubMtx   *mtxD,
   SubMtx   *mtxU,
   DV     *tempDV
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in factor.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------
   purpose -- to factor the front without pivoting
 
   return value -- # of eliminated rows and columns
 
   created -- 98aug27, cca
   ------------------------------------------------
*/
int
Chv_factorWithNoPivoting (
   Chv              *chv,
   PatchAndGoInfo   *info
) ;
/*
   ------------------------------------------------------------------
   purpose -- factor the pivot chevron with pivoting
 
   ndelay -- number of delayed rows and columns
   pivotflag -- enable pivoting or not
      0 --> no pivoting
      1 --> enable pivoting
   pivotsizesIV -- IV object that holds the sizes of the pivots,
      used only when the front is symmetric or hermitian
      and pivoting is enabled
   workDV -- DV object used for working storage, resized as necessary
   tau    -- upper bound on the magnitude of the entries 
      in the factors, used only when pivoting is enabled
   pntest -- pointer to be incremented with the number of pivot tests
 
   return value -- # of eliminated rows and columns
 
   created -- 98aug27, cca
   ------------------------------------------------------------------
*/
int
Chv_factorWithPivoting (
   Chv     *chv,
   int      ndelay,
   int      pivotflag,
   IV       *pivotsizesIV,
   DV       *workDV,
   double   tau,
   int      *pntest
) ;
/*
   ---------------------------------------------------------
   perform a rank one update using the first row and column.
   this is used in the (L + I)D(I + U) factorization
 
   return code ---
      0 if the pivot was zero
      1 if the pivot was nonzero
 
   created -- 98jan23, cca
   ---------------------------------------------------------
*/
int
Chv_r1upd (
   Chv   *chv
) ;
/*
   ------------------------------------------------------------------
   perform a rank two update using the first two rows.
   used in the (U^T + I)D(I + U) and (U^H + I)D(I + U) factorizations
 
   return code ---
      0 if the pivot was zero
      1 if the pivot was nonzero
 
   created -- 98jan23, cca
   ------------------------------------------------------------------
*/
int
Chv_r2upd (
   Chv   *chv
) ;
/*
   ------------------------------------------------------------------
   purpose -- looking at just a single chevron inside the Chv object,
              find the absolute value of the diagonal element, and
              the maximum absolute values of the offdiagonal elements 
              in the chevron's row and column.
 
   created -- 98aug26, cca
   ------------------------------------------------------------------
*/
void
Chv_maxabsInChevron (
   Chv      *chv,
   int      ichv,
   double   *pdiagmaxabs,
   double   *prowmaxabs,
   double   *pcolmaxabs
) ;
/*
   -------------------------------------------------------
   purpose -- zero the offdiagonal entries of chevron ichv
 
   created -- 98aug26, cca
   -------------------------------------------------------
*/
void
Chv_zeroOffdiagonalOfChevron (
   Chv   *chv,
   int   ichv
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in swap.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------
   swap rows irow and jrow
 
   created -- 98apr30, cca
   -----------------------
*/
void
Chv_swapRows (
   Chv   *chv,
   int    irow,
   int    jrow
) ;
/*
   --------------------------
   swap columns icol and jcol
 
   created -- 98apr30, cca
   --------------------------
*/
void
Chv_swapColumns (
   Chv   *chv,
   int     icol,
   int     jcol
) ;
/*
   -------------------------------
   swap rows and columns ii and jj
 
   created -- 98apr30, cca
   -------------------------------
*/
void
Chv_swapRowsAndColumns (
   Chv   *chv,
   int    ii,
   int    jj
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in search.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------
   find the first unmarked entry in
   the diagonal with largest magnitude
   if ( mark[jj] == tag ) then
      we can compare this entry
   endif
 
   created -- 98apr30, cca
   -----------------------------------
*/
int
Chv_maxabsInDiagonal11 (
   Chv     *chv,
   int      mark[],
   int      tag,
   double   *pmaxval
) ;
/*
   --------------------------------------------
   find the first unmarked entry in
   row irow with largest magnitude
   if ( colmark[jj] == tag ) then
      we can examined this entry
   endif
   only entries in the (1,1) block are examined
 
   created -- 98apr30, cca
   --------------------------------------------
*/
int
Chv_maxabsInRow11 (
   Chv     *chv,
   int      irow,
   int      colmark[],
   int      tag,
   double   *pmaxval
) ;
/*
   --------------------------------------------
   find the first unmarked entry in
   column jcol with largest magnitude
   if ( rowmark[ii] == tag ) then
      we can examined this entry
   endif
   only entries in the (1,1) block are examined
 
   created -- 98apr30, cca
   --------------------------------------------
*/
int
Chv_maxabsInColumn11 (
   Chv     *chv,
   int      jcol,
   int      rowmark[],
   int      tag,
   double   *pmaxval
) ;
/*
   --------------------------------------
   return the location of the first entry
   with largest magnitude in row irow.
   *pmaxval is filled with its magnitude.
 
   created -- 98apr30, cca
   --------------------------------------
*/
int
Chv_maxabsInRow (
   Chv     *chv,
   int      irow,
   double   *pmaxval
) ;
/*
   --------------------------------------
   return the location of the first entry
   with largest magnitude in column jcol.
   *pmaxval is filled with its magnitude.
 
   created -- 98apr30, cca
   --------------------------------------
*/
int
Chv_maxabsInColumn (
   Chv     *chv,
   int      jcol,
   double   *pmaxval
) ;
/*
   -------------------------------------------------------------
   return the magnitude of a quasimax entry from the unmarked
   rows and columns and fill *pirow and *pjcol with its location
 
   created -- 98apr30, cca
   -------------------------------------------------------------
*/
double
Chv_quasimax (
   Chv     *chv,
   int      rowmark[],
   int      colmark[],
   int      tag,
   int      *pirow,
   int      *pjcol
) ;
/*
   ---------------------------------------------------------------
   find a 1x1 or 2x2 pivot using the fast Bunch-Parlett algorithm.
   used only with symmetric chevrons.
 
   created -- 98apr30, cca
   ---------------------------------------------------------------
*/
void
Chv_fastBunchParlettPivot (
   Chv    *chv,
   int     mark[],
   int     tag,
   int     *pirow,
   int     *pjcol
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in findPivot.c -------------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------------------------
   purpose -- find and test a pivot
 
   workDV -- object that contains work vectors
   tau    -- upper bound on magnitude of factor entries
   ndelay -- number of delayed rows and columns on input
   pirow  -- pointer to be filled with pivot row
   pjcol  -- pointer to be filled with pivot column
   pntest -- pointer to be incremented with the number of pivot tests
 
   return value -- size of pivot
     0 --> pivot not found
     1 --> 1x1 pivot in row *pirow and column *pjcol
     2 --> 2x2 pivot in rows and columns *pirow and *pjcol,
           symmetric front only
   
   created -- 98jan24, cca
   ------------------------------------------------------------------
*/
int
Chv_findPivot (
   Chv      *chv,
   DV       *workDV,
   double   tau,
   int      ndelay,
   int      *pirow,
   int      *pjcol,
   int      *pntest
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in fill.c ------------------------------------------
------------------------------------------------------------------------
*/
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in assemble.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------------------------
   add a scaled multiple of a simple chevron to a Chv object.
   the indices are offsets.
   note: for this purpose, (assembling original entries into the
   matrix), the row and column indices of the chevron are identical.
   also, the indices of both the Chv object and the chvind[]
   vector are assumed to be in ascending order.
 
   created -- 98apr30, cca
   -----------------------------------------------------------------
*/
void
Chv_addChevron (
   Chv      *chv,
   double   alpha[],
   int      ichv,
   int      chvsize,
   int      chvind[],
   double   chvent[]
) ;
/*
   --------------------------------------------------------------
   assemble Chv object chvI into Chv object chvJ.
   note: the two objects must be of the same symmetry type,
         the row indices of chvI must nest into those of chvJ,
         the column indices of chvI must nest into those of chvJ.
 
   created -- 98apr30, cca
   --------------------------------------------------------------
*/
void
Chv_assembleChv (
   Chv   *chvJ,
   Chv   *chvI
) ;
/*
   ----------------------------------------------------------------
   purpose -- assemble the postponed data from the children
 
 
   newchv     -- Chv object to contain fully assembled front
   oldchv     -- Chv object that contains former front
   firstchild -- pointer to first child in the list of children
                 Chv objects to be merged into the new front
 
   return value -- # of delayed rows and columns added to the front

   created -- 98apr30, cca
   ----------------------------------------------------------------
*/
int
Chv_assemblePostponedData (
   Chv   *newchv,
   Chv   *oldchv,
   Chv   *firstchild
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in copy.c ------------------------------------------
------------------------------------------------------------------------
*/
#define CHV_STRICT_LOWER    1
#define CHV_DIAGONAL        2
#define CHV_STRICT_UPPER    3
#define CHV_STRICT_LOWER_11 4
#define CHV_LOWER_21        5
#define CHV_STRICT_UPPER_11 6
#define CHV_UPPER_12        7
#define CHV_BY_ROWS         0
#define CHV_BY_COLUMNS      1
/*
   -------------------------------------------------------------------
  purpose -- copy entries to a vector.
 
   length     -- length of dvec[]
   npivot     -- number of pivots, may be 0
   pivotsizes -- vector of pivot sizes, may be NULL
   dvec[]     -- vector to receive matrix entries
   copyflag   -- flag to denote what part of the entries to copy
      CHV_STRICT_LOWER    --> copy strict lower entries
      CHV_DIAGONAL        --> copy diagonal entries
      CHV_STRICT_UPPER    --> copy strict upper entries
      CHV_STRICT_LOWER_11 --> copy strict lower entries in (1,1) block
      CHV_LOWER_21        --> copy lower entries in (2,1) block
      CHV_STRICT_UPPER_11 --> copy strict upper entries in (1,1) block
      CHV_UPPER_12        --> copy upper entries in (1,2) block
   storeflag  -- flag to denote how to store entries in dvec[]
      CHV_BY_ROWS    --> store by rows
      CHV_BY_COLUMNS --> store by columns
 
   return value -- number of entries copied
 
   created  -- 97jun05, cca
   modified -- 98feb27, cca
     cases 4-7 inserted
   -------------------------------------------------------------------
*/
int
Chv_copyEntriesToVector (
   Chv      *chv,
   int      npivot,
   int      pivotsizes[],
   int      length,
   double   *dvec,
   int      copyflag,
   int      storeflag
) ;
/*
   -------------------------------------------------------------------
   purpose -- copy large entries to a vector. the portion copied
              can be a union of the strict lower portion,
              the diagonal portion, and the strict upper
              portion. there is one restriction, if the strict
              lower and strict upper are to be copied, the
              diagonal will also be copied.
 
   npivot     -- number of pivots, may be 0
   pivotsizes -- vector of pivot sizes, may be NULL
   sizes[]    -- vector to receive row/column sizes
   ivec[]     -- vector to receive row/column indices
   dvec[]     -- vector to receive matrix entries
   copyflag   -- flag to denote what part of the entries to copy
      CHV_STRICT_LOWER    --> copy strict lower entries
      CHV_STRICT_UPPER    --> copy strict upper entries
      CHV_STRICT_LOWER_11 --> copy strict lower entries in (1,1) block
      CHV_LOWER_21        --> copy lower entries in (2,1) block
      CHV_STRICT_UPPER_11 --> copy strict upper entries in (1,1) block
      CHV_UPPER_12        --> copy upper entries in (1,2) block
   storeflag  -- flag to denote how to store entries in dvec[]
      CHV_BY_ROWS    --> store by rows
      CHV_BY_COLUMNS --> store by columns
   droptol    -- entry to be copied must be larger than this magnitude
 
   return value -- number of entries copied
 
   created  -- 97jun05, cca
   modified -- 97feb27, cca
      cases 4-7 inserted
   -------------------------------------------------------------------
*/
int
Chv_copyBigEntriesToVector (
   Chv     *chv,
   int      npivot,
   int      pivotsizes[],
   int      sizes[],
   int      ivec[],
   double   dvec[],
   int      copyflag,
   int      storeflag,
   double   droptol
) ;
/*
   -------------------------------------------------------------------
   purpose -- return the number of entries
              in a portion of the object
 
   countflag -- which entries to count
      CHV_STRICT_LOWER    --> copy strict lower entries
      CHV_STRICT_UPPER    --> copy strict upper entries
      CHV_STRICT_LOWER_11 --> copy strict lower entries in (1,1) block
      CHV_LOWER_21        --> copy lower entries in (2,1) block
      CHV_STRICT_UPPER_11 --> copy strict upper entries in (1,1) block
      CHV_UPPER_12        --> copy upper entries in (1,2) block
 
   created -- 98feb27, cca
   -------------------------------------------------------------------
*/
int
Chv_countEntries (
   Chv     *chv,
   int      npivot,
   int      pivotsizes[],
   int      countflag
) ;
/*
   -------------------------------------------------------------------
   purpose -- return the number of entries
   whose magnitude is larger than droptol.
 
   countflag -- which entries to count
      CHV_STRICT_LOWER    --> copy strict lower entries
      CHV_STRICT_UPPER    --> copy strict upper entries
      CHV_STRICT_LOWER_11 --> copy strict lower entries in (1,1) block
      CHV_LOWER_21        --> copy lower entries in (2,1) block
      CHV_STRICT_UPPER_11 --> copy strict upper entries in (1,1) block
      CHV_UPPER_12        --> copy upper entries in (1,2) block
 
   created  -- 97jun07, cca
   modified -- 98feb27, cca
     cases 4-7 inserted
   -------------------------------------------------------------------
*/
int
Chv_countBigEntries (
   Chv     *chv,
   int      npivot,
   int      pivotsizes[],
   int      countflag,
   double   droptol
) ;
/*
   ----------------------------------------------------------
   purpose -- copy the trailing chevron that starts at offset
 
   created -- 97may16, cca
   ----------------------------------------------------------
*/
void
Chv_copyTrailingPortion (
   Chv   *chvI,
   Chv   *chvJ,
   int    offset
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in util.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------
   shift the indices, entries and adjust the nD dimension.
   note: shift can be positive or negative
 
   created -- 98apr30, cca
   -------------------------------------------------------
*/
void
Chv_shift (
   Chv   *chv,
   int    shift
) ;
/*
   ----------------------------------------------------------
   return the maximum magnitude of the entries in the chevron
 
   created -- 98apr30, cca
   ----------------------------------------------------------
*/
double
Chv_maxabs (
   Chv   *chv
) ;
/*
   -------------------------------------------------------
   return the frobenius norm of the entries in the chevron
 
   created -- 98apr30, cca
   -------------------------------------------------------
*/
double
Chv_frobNorm (
   Chv   *chv
) ;
/*
   -----------------------
   subtract chvI from chvJ
 
   created -- 98apr30, cca
   -----------------------
*/
void
Chv_sub (
   Chv   *chvJ,
   Chv   *chvI
) ;
/*
   -------------------------------
   zero the entries in the chevron
 
   created -- 98apr30, cca
   -------------------------------
*/
void
Chv_zero (
   Chv   *chv
) ;
/*
   -------------------------------
   fill A2 object with (1,1) block
 
   created -- 98apr30, cca
   -------------------------------
*/
void
Chv_fill11block (
   Chv   *chv,
   A2    *mtx
) ;
/*
   -------------------------------
   fill A2 object with (1,2) block
 
   created -- 98apr30, cca
   -------------------------------
*/
void
Chv_fill12block (
   Chv   *chv,
   A2    *mtx
) ;
/*
   -------------------------------
   fill A2 object with (2,1) block
 
   created -- 98apr30, cca
   -------------------------------
*/
void
Chv_fill21block (
   Chv   *chv,
   A2    *mtx
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in IO.c --------------------------------------------
------------------------------------------------------------------------
*/
/*
   ----------------------------------------
   purpose -- to write the object to a file
              in human readable form
 
   created -- 98apr30, cca
   ----------------------------------------
*/
void
Chv_writeForHumanEye (
   Chv    *chv,
   FILE   *fp
) ;
/*
   ------------------------------------------------
   purpose -- write out the entries in matlab style
 
   created -- 98apr30, cca
   ------------------------------------------------
*/
void
Chv_writeForMatlab (
   Chv    *chv,
   char   *chvname,
   FILE   *fp
) ;
/*--------------------------------------------------------------------*/