divisor_class_group.h 1.53 KB
Newer Older
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
/* Common header file for the rrspace software

This file is part of the rrspace project.

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., 51
Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

*/

// This file contains routines for computing reduced divisors with respect to a
// degree 1 divisor. It also implements the group law in the divisor class
// group.

#ifndef DIVISOR_CLASS_GROUP_H_
#define DIVISOR_CLASS_GROUP_H_

#include "divisor.h"
#include "algos.h"

// Reduction routine: D1 must be a divisor of degree 0 and D2 must be a divisor
// of degree 1.
// 
// Returns an effective divisor D such that D1 = D - g*D2.
// TODO: not yet tested.

EffectiveDivisor 
DivisorReduction(const Divisor& D1, const Divisor& D2, std::size_t g);

// D degree 1 divisor
EffectiveDivisor
AddReduced(std::size_t g, 
43 44
           const Divisor& O, 
           const EffectiveDivisor& E,
45 46 47 48
           const EffectiveDivisor& D1, 
           const EffectiveDivisor& D2);

#endif