source: trunk/Clp/src/CoinAbcCommonFactorization.hpp @ 1879

Last change on this file since 1879 was 1878, checked in by forrest, 7 years ago

minor changes to implement Aboca

File size: 3.0 KB
Line 
1/* $Id: CoinAbcCommonFactorization.hpp 1448 2011-06-19 15:34:41Z stefan $ */
2// Copyright (C) 2000, International Business Machines
3// Corporation and others, Copyright (C) 2012, FasterCoin.  All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5#ifndef CoinAbcCommonFactorization_H
6#define CoinAbcCommonFactorization_H
7#if defined(_MSC_VER)
8// Turn off compiler warning about long names
9#  pragma warning(disable:4786)
10#endif
11/* meaning of ABC_SMALL
12   -1 force copies (and no tests)
13   0 force copy of U
14   2 force no copies (and no tests)
15*/
16
17#include "CoinAbcCommon.hpp"
18//#define DONT_USE_SLACKS
19//#define COIN_ONE_ETA_COPY 100
20//#define COIN_FAC_NEW 1
21#define INITIAL_AVERAGE 1.0
22#define INITIAL_AVERAGE2 1.0
23#define AVERAGE_SCALE_BACK 0.8
24//#define SWITCHABLE_STATISTICS
25#ifndef SWITCHABLE_STATISTICS
26#define setStatistics(x)
27#define factorizationStatistics() (true)
28#else
29#define setStatistics(x) collectStatistics_=x
30#define factorizationStatistics() (collectStatistics_)
31#endif
32#include "CoinAbcDenseFactorization.hpp"
33class CoinPackedMatrix;
34class CoinFactorization;
35#define FACTORIZATION_STATISTICS 0 //1
36typedef struct {
37  double countInput_;
38  double countAfterL_;
39  double countAfterR_;
40  double countAfterU_;
41  double averageAfterL_;
42  double averageAfterR_;
43  double averageAfterU_;
44#if FACTORIZATION_STATISTICS
45  double twiddleFactor1_;
46  double twiddleFactor2_;
47#endif 
48  CoinSimplexInt numberCounts_;
49} CoinAbcStatistics;
50#if FACTORIZATION_STATISTICS
51#define twiddleFactor1S()  (statistics.twiddleFactor1_)
52#define twiddleFactor2S()  (statistics.twiddleFactor2_)
53#define twiddleFtranFactor1()  (ftranTwiddleFactor1_)
54#define twiddleFtranFTFactor1()  (ftranFTTwiddleFactor1_)
55#define twiddleBtranFactor1()  (btranTwiddleFactor1_)
56#define twiddleFtranFactor2()  (ftranTwiddleFactor2_)
57#define twiddleFtranFTFactor2()  (ftranFTTwiddleFactor2_)
58#define twiddleBtranFactor2()  (btranTwiddleFactor2_)
59#define twiddleBtranFullFactor1()  (btranFullTwiddleFactor1_)
60#else
61#define twiddleFactor1S()  (1.0)
62#define twiddleFactor2S()  (1.0)
63#define twiddleFtranFactor1()  (1.0)
64#define twiddleFtranFTFactor1()  (1.0)
65#define twiddleBtranFactor1()  (1.0)
66#define twiddleFtranFactor2()  (1.0)
67#define twiddleFtranFTFactor2()  (1.0)
68#define twiddleBtranFactor2()  (1.0)
69#define twiddleBtranFullFactor1()  (1.0)
70#endif 
71#define ABC_FAC_GOT_LCOPY 4
72#define ABC_FAC_GOT_RCOPY 8
73#define ABC_FAC_GOT_UCOPY 16
74#define ABC_FAC_GOT_SPARSE 32
75typedef struct {
76  CoinBigIndex next;
77  CoinBigIndex start;
78  CoinSimplexUnsignedInt stack;
79} CoinAbcStack;
80void CoinAbcDgetrs(char trans,int m, double * a, double * work);
81int  CoinAbcDgetrf(int m, int n, double * a, int lda, int * ipiv
82#if ABC_PARALLEL==2
83                          ,int parallelMode
84#endif
85);
86void CoinAbcDgetrs(char trans,int m, long double * a, long double * work);
87int  CoinAbcDgetrf(int m, int n, long double * a, int lda, int * ipiv
88#if ABC_PARALLEL==2
89                          ,int parallelMode
90#endif
91);
92#define SWAP_FACTOR 2
93#define BLOCKING8 8
94#define BLOCKING8X8 BLOCKING8*BLOCKING8
95#endif
Note: See TracBrowser for help on using the repository browser.