This file is indexed.

/usr/include/trilinos/Isorropia_Epetra.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.

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
//@HEADER
/*
************************************************************************

              Isorropia: Partitioning and Load Balancing Package
                Copyright (2006) Sandia Corporation

Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
license for use of this work by or on behalf of the U.S. Government.

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA

************************************************************************
*/
//@HEADER

#ifndef _Isorropia_Epetra_hpp_
#define _Isorropia_Epetra_hpp_

#include <Isorropia_ConfigDefs.hpp>
#include <Teuchos_RCP.hpp>
#include <Teuchos_ParameterList.hpp>

#ifdef HAVE_EPETRA
class Epetra_Comm;
class Epetra_Map;
class Epetra_BlockMap;
class Epetra_Import;
class Epetra_Vector;
class Epetra_MultiVector;
class Epetra_RowMatrix;
class Epetra_CrsGraph;
class Epetra_CrsMatrix;
class Epetra_LinearProblem;
#endif

namespace Isorropia {

namespace Epetra {

  class Partitioner;
  class CostDescriber;

#ifdef HAVE_EPETRA

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_MultiVector *
createBalancedCopy(const Epetra_MultiVector& input_vector);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_MultiVector *
createBalancedCopy(const Epetra_MultiVector& input_vector,
                     const Teuchos::ParameterList& paramlist);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_CrsGraph *
createBalancedCopy(const Epetra_CrsGraph& input_graph);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_CrsGraph *
createBalancedCopy(const Epetra_CrsGraph& input_graph,
                     const Teuchos::ParameterList& paramlist);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_CrsMatrix *
createBalancedCopy(const Epetra_CrsMatrix& input_matrix);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/
Epetra_CrsMatrix *
createBalancedCopy(const Epetra_CrsMatrix& input_matrix,
                     const Teuchos::ParameterList& paramlist);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/

Epetra_LinearProblem *
createBalancedCopy(const Epetra_LinearProblem & input_problem);

/** createBalancedCopy() creates a copy with a more balanced map.
    The caller should free the copy after use.
*/

Epetra_LinearProblem *
createBalancedCopy(const Epetra_LinearProblem & input_problem,
                     const Teuchos::ParameterList& paramlist);

/** create_target_map() is an internal function used by Isorropia.

   Given a Partitioner object, create a target map representing the
   new partitioning.
   This function calls partitioner.compute_partitioning() if it has not
   already been called.
*/
// Teuchos::RCP<Epetra_Map>
// create_target_map(const Epetra_Comm& comm, Partitioner& partitioner);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign unit weight to each row (vertex), and unit weight to each 
  column (hyperedge).  It will attempt to balance row weights while 
  minimizing cuts in the hyperedges.

  The non-Zoltan rebalancing is 1-D, row-wise, and attempts to make the number
  of nonzeros equal in each partition. I.e., it is equivalent to specifying
  a weighted rebalance where the weights are the number of nonzeros in
  each row.

*/
__deprecated Teuchos::RCP<Epetra_CrsMatrix>
  create_balanced_copy(const Epetra_CrsMatrix& input_matrix);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  The balancing algorithm (Zoltan or non-Zoltan) will use the row
  weights provided for the matrix rows.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign a unit weight to each column (hyperedge).  It will attempt 
  to balance row weights while minimizing cuts in the hyperedges.

  The non-Zoltan rebalancing is a quick 1-D, row-wise balancing.
*/
__deprecated Teuchos::RCP<Epetra_CrsMatrix>
  create_balanced_copy(const Epetra_CrsMatrix& input_matrix,
                       const Epetra_Vector &row_weights);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  It will assign unit weight to
  each row (vertex), and unit weight to each column (hyperedge).  It will
  attempt to minimize cuts in the hyperedges.
*/
__deprecated Teuchos::RCP<Epetra_CrsMatrix>
  create_balanced_copy(const Epetra_CrsMatrix& input_matrix,
                     const Teuchos::ParameterList& paramlist);



/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.  It ignores the
  costs object.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.  The weights
  provided in the CostDescriber object will be supplied to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  

  If an empty CostDescriber is supplied, we will assign unit weight to each 
  row (vertex), and unit weight to each column (hyperedge), in the case of 
  hypergraph partitioning.  We will assign unit weight to each row (vertex)
  and each non zero (edge) in the case of graph partitioning.
*/
__deprecated Teuchos::RCP<Epetra_CrsMatrix>
  create_balanced_copy(const Epetra_CrsMatrix& input_matrix,
                     CostDescriber &costs,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign unit weight to each row (vertex), and unit weight to each 
  column (hyperedge).  It will attempt to minimize cuts in the hyperedges.

  The non-Zoltan rebalancing is 1-D, row-wise, and attempts to make the number
  of nonzeros equal in each partition. I.e., it is equivalent to specifying
  a weighted rebalance where the weights are the number of nonzeros in
  each row.

*/
__deprecated Teuchos::RCP<Epetra_RowMatrix>
  create_balanced_copy(const Epetra_RowMatrix& input_matrix);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  The balancing algorithm (Zoltan or non-Zoltan) will use the row
  weights provided for the matrix rows.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign a unit weight to each column (hyperedge).  It will attempt 
  to balance row weights while minimizing cuts in the hyperedges.

  The non-Zoltan rebalancing is a quick 1-D, row-wise balancing.
*/
__deprecated Teuchos::RCP<Epetra_RowMatrix>
  create_balanced_copy(const Epetra_RowMatrix& input_matrix,
                       const Epetra_Vector &row_weights);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  It will assign unit weight to
  each row (vertex), and unit weight to each column (hyperedge).  It will
  attempt to minimize cuts in the hyperedges.
*/
__deprecated Teuchos::RCP<Epetra_RowMatrix>
  create_balanced_copy(const Epetra_RowMatrix& input_matrix,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.  The costs
  object is ignored in this case.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.  The weights
  provided in the CostDescriber object will be supplied to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  

  If an empty CostDescriber is supplied, we will assign unit weight to each 
  row (vertex), and unit weight to each column (hyperedge), in the case of 
  hypergraph partitioning.  We will assign unit weight to each row (vertex)
  and each non zero (edge) in the case of graph partitioning.
*/
__deprecated Teuchos::RCP<Epetra_RowMatrix>
  create_balanced_copy(const Epetra_RowMatrix& input_matrix,
                     CostDescriber &costs,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign unit weight to each row (vertex), and unit weight to each 
  column (hyperedge).  It will attempt to minimize cuts in the hyperedges.

  The non-Zoltan rebalancing is 1-D, row-wise, and attempts to make the number
  of nonzeros equal in each partition. I.e., it is equivalent to specifying
  a weighted rebalance where the weights are the number of nonzeros in
  each row.

*/
__deprecated Teuchos::RCP<Epetra_CrsGraph>
  create_balanced_copy(const Epetra_CrsGraph& input_graph);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  The balancing algorithm (Zoltan or non-Zoltan) will use the row
  weights provided for the matrix rows.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign a unit weight to each column (hyperedge).  It will attempt 
  to balance row weights while minimizing cuts in the hyperedges.

  The non-Zoltan rebalancing is a quick 1-D, row-wise balancing.
*/
__deprecated Teuchos::RCP<Epetra_CrsGraph>
  create_balanced_copy(const Epetra_CrsGraph& input_matrix,
                       const Epetra_Vector &row_weights);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  It will assign unit weight to
  each row (vertex), and unit weight to each column (hyperedge).  It will
  attempt to minimize cuts in the hyperedges.
*/
__deprecated Teuchos::RCP<Epetra_CrsGraph>
  create_balanced_copy(const Epetra_CrsGraph& input_graph,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.  The weights
  provided in the CostDescriber object will be supplied to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  

  If an empty CostDescriber is supplied, we will assign unit weight to each 
  row (vertex), and unit weight to each column (hyperedge), in the case of 
  hypergraph partitioning.  We will assign unit weight to each row (vertex)
  and each non zero (edge) in the case of graph partitioning.
*/
__deprecated Teuchos::RCP<Epetra_CrsGraph>
  create_balanced_copy(const Epetra_CrsGraph& input_graph,
                     CostDescriber &costs,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.


  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign unit weight to each row (vertex), and unit weight to each 
  column (hyperedge).  It will attempt to minimize cuts in the hyperedges.

  The non-Zoltan rebalancing is 1-D, row-wise, and attempts to make the number
  of nonzeros equal in each partition. I.e., it is equivalent to specifying
  a weighted rebalance where the weights are the number of nonzeros in
  each row.

*/

__deprecated Teuchos::RCP<Epetra_LinearProblem>
  create_balanced_copy(const Epetra_LinearProblem & input_problem);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia will use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  The balancing algorithm (Zoltan or non-Zoltan) will use the row
  weights provided for the matrix rows.

  Zoltan will perform hypergraph partitioning using its own PHG method.  
  It will assign a unit weight to each column (hyperedge).  It will attempt 
  to balance row weights while minimizing cuts in the hyperedges.

  The non-Zoltan rebalancing is a quick 1-D, row-wise balancing.
*/
__deprecated Teuchos::RCP<Epetra_LinearProblem>
  create_balanced_copy(const Epetra_LinearProblem& input_matrix,
                       const Epetra_Vector &row_weights);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  It will assign unit weight to
  each row (vertex), and unit weight to each column (hyperedge).  It will
  attempt to minimize cuts in the hyperedges.
*/

__deprecated Teuchos::RCP<Epetra_LinearProblem>
  create_balanced_copy(const Epetra_LinearProblem& input_problem,
                     const Teuchos::ParameterList& paramlist);

/** create_balanced_copy(), which is part of the Isorropia API, is used to
    create and return a balanced copy of an input Epetra_CrsMatrix.

  Isorropia can use Zoltan to perform partitioning if it has been
  configured with Zoltan support.  If Zoltan is not available, it will
  perform its own simple row partitioning.

  In addition, if the parameter "PARTITIONING_METHOD" is set to "SIMPLE_LINEAR",
  Isorropia will perform its own simple row partitioning, even if Zoltan is
  available.  This method balances the rows across processes after assigning 
  each row a weight equal to the number of non zeros it has.  This costs
  object is ignored in this case.

  If Zoltan is called to do the partitioning, any parameters set in a
  "Zoltan" sublist of the paramlist are provided to Zoltan.  The weights
  provided in the CostDescriber object will be supplied to Zoltan.

  Refer to the Zoltan users guide for specific parameters that Zoltan
  recognizes. A couple of important ones are "LB_METHOD" (valid values
  include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are
  0 to 10, default is 1), etc.

  If no Zoltan parameters are provided, Zoltan will perform hypergraph
  partitioning using its own PHG method.  

  If an empty CostDescriber is supplied, we will assign unit weight to each 
  row (vertex), and unit weight to each column (hyperedge), in the case of 
  hypergraph partitioning.  We will assign unit weight to each row (vertex)
  and each non zero (edge) in the case of graph partitioning.
*/
__deprecated Teuchos::RCP<Epetra_LinearProblem>
  create_balanced_copy(const Epetra_LinearProblem& input_problem,
                     CostDescriber &costs,
                     const Teuchos::ParameterList& paramlist);

__deprecated Teuchos::RCP<Epetra_MultiVector>
create_balanced_copy(const Epetra_MultiVector &coords,
                   const Teuchos::ParameterList& paramlist);

__deprecated Teuchos::RCP<Epetra_MultiVector>
create_balanced_copy(const Epetra_MultiVector &coords,
                     const Epetra_MultiVector &weights,
                   const Teuchos::ParameterList& paramlist);


__deprecated Teuchos::RCP<Epetra_MultiVector>
create_balanced_copy(const Epetra_MultiVector &coords);

__deprecated Teuchos::RCP<Epetra_MultiVector>
create_balanced_copy(const Epetra_MultiVector &coords,
                     const Epetra_MultiVector &weights);

/** redistribute_rows() is an internal Isorropia function, not part
    of the API.

  Return a new Epetra_CrsMatrix object constructed with target_rowmap,
  and with the contents of input_matrix imported into it.

  The caller is responsible for deleting the returned object.

  param input_matrix Source/input object.

  param target_rowmap Target rowmap, required to be compatible with
     input_matrix.RowMap() in terms of number-of-elements, etc.

  param importer Optional argument. If importer is supplied, it will be
     used to perform the import operation. Otherwise, a temporary importer
     will be created and used.
*/
Teuchos::RCP<Epetra_CrsMatrix>
  redistribute_rows(const Epetra_CrsMatrix& input_matrix,
                    const Epetra_Map& target_rowmap,
                    Epetra_Import* importer=0);

/** redistribute_rows() is an internal Isorropia function, not part
    of the API.

    Return a new Epetra_CrsMatrix object constructed with target_rowmap,
  and with the contents of input_matrix imported into it.

  The caller is responsible for deleting the returned object.

  param input_matrix Source/input object.

  param target_rowmap Target rowmap, required to be compatible with
     input_matrix.RowMatrixRowMap() in terms of number-of-elements, etc.

  param importer Optional argument. If importer is supplied, it will be
     used to perform the import operation. Otherwise, a temporary importer
     will be created and used.
*/
Teuchos::RCP<Epetra_CrsMatrix>
  redistribute_rows(const Epetra_RowMatrix& input_matrix,
                    const Epetra_Map& target_rowmap,
                    Epetra_Import* importer=0);

/** Return a new Epetra_CrsGraph object constructed with target_rowmap,
  and with the contents of input_graph imported into it.

  param input_graph Source/input object.

  param target_rowmap Target rowmap, required to be compatible with
     input_graph.RowMap() in terms of number-of-elements, etc.

  param importer Optional argument. If importer is supplied, it will be
     used to perform the import operation. Otherwise, a temporary importer
     will be created and used.
*/
Teuchos::RCP<Epetra_CrsGraph>
  redistribute_rows(const Epetra_CrsGraph& input_graph,
                    const Epetra_Map& target_rowmap,
                    Epetra_Import* importer=0);

/** Return a new Epetra_MultiVector object constructed with target_map,
  and with the contents of 'input' imported into it.

  param input Source/input object.

  param target_map Target map, required to be compatible with
     input.Map() in terms of number-of-elements, etc.

  param importer Optional argument. If importer is supplied, it will be
     used to perform the import operation. Otherwise, a temporary importer
     will be created and used.
*/
Teuchos::RCP<Epetra_MultiVector>
  redistribute(const Epetra_MultiVector& input,
               const Epetra_BlockMap& target_map,
               Epetra_Import* importer=0);

/** Return a new Epetra_Vector object constructed with target_map,
  and with the contents of 'input' imported into it.

  param input Source/input object.

  param target_map Target map, required to be compatible with
     input.RowMap() in terms of number-of-elements, etc.

  param importer Optional argument. If importer is supplied, it will be
     used to perform the import operation. Otherwise, a temporary importer
     will be created and used.
*/
Teuchos::RCP<Epetra_Vector>
  redistribute(const Epetra_Vector& input,
               const Epetra_Map& target_map,
               Epetra_Import* importer=0);

#ifndef DOXYGEN_SHOULD_SKIP_THIS

/** Return a vector containing weights that are equal to the number of
  nonzeros per row in the input_matrix. The returned vector will have
  the same size and distribution as input_matrix's row-map.
*/
Epetra_MultiVector* create_row_weights_nnz(const Epetra_RowMatrix& input_matrix);

/** Return a vector containing weights that are equal to the number of
  nonzeros per row in the input_graph. The returned vector will have
  the same size and distribution as input_graph's row-map.
*/
Epetra_MultiVector* create_row_weights_nnz(const Epetra_CrsGraph& input_graph);

Epetra_MultiVector* create_unit_weights(const Epetra_MultiVector& input_coords);


/** Calculate a new partitioning, and fill output containers with new
    elements for the local partition, as well as export and import lists.
    This is a simple linear partitioning that does not use Zoltan.

    \param[in] input_map Input map describing the existing or 'old' partitioning.

    \param[in] weights Input vector giving a weight for each element in input_map.
    weights.Map() is required to be the same size and layout as input_map.

    \param[out] newPartitions contains the new partition for each element,
                    in input_map local ID order.  Partition numbers go from
                    0 to numProcs - 1
         
    \param[out] exports the number of exports, that is, the number of
                  elements in newPartitions that are not equal to my
                  process rank

    \param[out] imports the list of global IDs of the elements I will
                   import under the new partitioning

    \return Error-code, 0 if successful. This probably should be a void
    function, since a serious error will result in an exception-throw
    rather than an integer-code error-return.
*/
int
repartition(const Epetra_BlockMap& input_map,
	    const Epetra_MultiVector& weights,
	    std::vector<int>& myNewElements,
	    int& exportsSize,
	    std::vector<int>& imports);

/**  gather_all_proc_global_offsets() is an internal Isorropia function, not
     part of the API.

    Given an Epetra_BlockMap object, fill a vector of length numprocs+1
  with each processor's starting offset into the Epetra_BlockMap's global
  set of elements (the last position will contain num-global-elements).
  Gather the vector of offsets onto all processors.
*/
void gather_all_proc_global_offsets(const Epetra_BlockMap& blkmap,
                                    std::vector<int>& all_proc_offsets);


/**  compute_imbalance() is an internal Isorropia function, not
     part of the API.

     This function is used by Isorropia to compute the global imbalance
     of an initial partitioning and a new partitioning, to ensure the
     new computed partitioning is better.
*/

double compute_imbalance(int nprocs, std::vector<int> &offsets, 
                         double *wgts, double target);

#endif //DOXYGEN_SHOULD_SKIP_THIS
#endif //HAVE_EPETRA

}//namespace Epetra
}//namespace Isorropia

#endif