#include <minpoly.h>
Definition at line 105 of file minpoly.h.
◆ NewVectorMatrix()
NewVectorMatrix::NewVectorMatrix |
( |
unsigned |
n, |
|
|
unsigned long |
p |
|
) |
| |
Definition at line 181 of file minpoly.cc.
182{
185
186 matrix =
new unsigned long *[
n];
187 for(
int i = 0;
i <
n;
i++)
188 {
190 }
191
193
195
196 for (
int i = 0;
i <
n;
i++)
197 {
199 }
200
202}
◆ ~NewVectorMatrix()
NewVectorMatrix::~NewVectorMatrix |
( |
| ) |
|
Definition at line 204 of file minpoly.cc.
205{
208
209 for(
int i = 0;
i <
n;
i++)
210 {
212 }
214}
◆ findLargestNonpivot()
int NewVectorMatrix::findLargestNonpivot |
( |
| ) |
|
Definition at line 366 of file minpoly.cc.
367{
368
370 return -1;
371
372 for(
int i =
n-1;
i >= 0;
i--)
373 {
374 bool isPivot = false;
376 {
378 {
379 isPivot = true;
380 break;
381 }
382 }
383
384 if(!isPivot)
385 {
387 }
388 }
389 abort();
390}
◆ findSmallestNonpivot()
int NewVectorMatrix::findSmallestNonpivot |
( |
| ) |
|
Definition at line 339 of file minpoly.cc.
340{
341
342
344 return -1;
345
346 for(
int i = 0;
i <
n;
i++)
347 {
348 bool isPivot = false;
350 {
352 {
353 isPivot = true;
354 break;
355 }
356 }
357
358 if(!isPivot)
359 {
361 }
362 }
363 abort();
364}
◆ firstNonzeroEntry()
int NewVectorMatrix::firstNonzeroEntry |
( |
unsigned long * |
row | ) |
|
Definition at line 216 of file minpoly.cc.
217{
218 for(
int i = 0;
i <
n;
i++)
221
222 return -1;
223}
◆ insertMatrix()
Definition at line 331 of file minpoly.cc.
332{
333 for(
int i = 0;
i < mat.
rows;
i++)
334 {
336 }
337}
void insertRow(unsigned long *row)
◆ insertRow()
void NewVectorMatrix::insertRow |
( |
unsigned long * |
row | ) |
|
Definition at line 236 of file minpoly.cc.
237{
239 {
241 unsigned x = row[piv];
242
244 {
245
246
247
248 row[piv] = 0;
249
250 int smallestNonPivIndex = 0;
251 while (
nonPivots[smallestNonPivIndex] < piv)
252 {
253 smallestNonPivIndex++;
254 }
255
256 for (
int j = smallestNonPivIndex;
j <
n-
rows;
j++)
257 {
260 {
263 row[ind] += tmp;
265 {
267 }
268 }
269 }
270 }
271 }
272
274
275 if(piv != -1)
276 {
277
278
280 for(
int i = 0;
i <
n;
i++)
281 {
283 }
284
285
287 {
289
290
292 {
293 for (
int j = piv;
j <
n;
j++)
294 {
296 {
301 {
303 }
304 }
305 }
306 }
307 }
308
310
311
313 {
315 {
316
318 {
320 }
321
322 break;
323 }
324 }
325
327 }
328}
void normalizeRow(unsigned long *row, unsigned i)
int firstNonzeroEntry(unsigned long *row)
static unsigned long multMod(unsigned long a, unsigned long b, unsigned long p)
◆ normalizeRow()
void NewVectorMatrix::normalizeRow |
( |
unsigned long * |
row, |
|
|
unsigned |
i |
|
) |
| |
Definition at line 225 of file minpoly.cc.
226{
229
230 for(
int j =
i + 1;
j <
n;
j++)
231 {
233 }
234}
unsigned long modularInverse(long long x, long long p)
◆ matrix
unsigned long** NewVectorMatrix::matrix |
|
private |
unsigned long NewVectorMatrix::n |
|
private |
◆ nonPivots
unsigned* NewVectorMatrix::nonPivots |
|
private |
unsigned NewVectorMatrix::p |
|
private |
◆ pivots
unsigned* NewVectorMatrix::pivots |
|
private |
◆ rows
unsigned NewVectorMatrix::rows |
|
private |
The documentation for this class was generated from the following files: