60 TObject::operator=(
src);
76 while (
first <= last) {
77 int mid = (
first + last) >> 1;
96 while (
first <= last) {
97 int mid = (
first + last) >> 1;
117 while (
first <= last) {
118 int mid = (
first + last) >> 1;
130 UShort_t* arrI =
new UShort_t[
fNElems + 1];
137 Double_t* arrE =
new Double_t[
fNElems + 1];
156 UShort_t* arrI =
new UShort_t[sz];
157 Double_t* arrE =
new Double_t[sz];
158 memset(arrI, 0, sz *
sizeof(UShort_t));
159 memset(arrE, 0, sz *
sizeof(Double_t));
162 int cpsz = TMath::Min(
fNElems, sz);
163 memcpy(arrI,
fIndex, cpsz *
sizeof(UShort_t));
164 memcpy(arrE,
fElems, cpsz *
sizeof(Double_t));
177 for (
int j =
i;
j--;) {
197 int ndig = sopt.Atoi();
219 for (
int i =
n;
i--;) {
222 Bool_t toAdd = kTRUE;
224 while (
first <= last) {
225 mid = (
first + last) >> 1;
249 UShort_t* arrI =
new UShort_t[
fNElems + nadd];
250 Double_t* arrE =
new Double_t[
fNElems + nadd];
252 int inew = 0, iold = 0;
253 for (
int i = 0;
i <
n;
i++) {
254 if ((indx = indc[
i]) < 0) {
258 arrI[inew] =
fIndex[iold];
259 arrE[inew++] =
fElems[iold++];
262 arrE[inew++] = valc[
i];
266 arrI[inew] =
fIndex[iold];
267 arrE[inew++] =
fElems[iold++];
Sparse vector class (from AliROOT), used as row of the MatrixSparse class.
void Clear(Option_t *option="") override
clear all
void Print(Option_t *option="") const override
print itself
Double_t FindIndex(Int_t ind) const
return an element with given index
Double_t & FindIndexAdd(Int_t ind)
increment an element with given index
Int_t fNElems
Number of elements.
void ReSize(Int_t sz, Bool_t copy=kFALSE)
change the size
Double_t * fElems
pointer on elements
UShort_t * fIndex
Index of stored elems.
virtual void SetToZero(Int_t ind)
set element to 0 if it was already defined
VectorSparse & operator=(const VectorSparse &src)
assignment op-tor
void SortIndices(Bool_t valuesToo=kFALSE)
sort indices in increasing order. Used to fix the row after ILUk decomposition
void Add(Double_t *valc, Int_t *indc, Int_t n)
add indiced array to row. Indices must be in increasing order