Changeset 8d8fef in git for factory/cf_ops.cc


Ignore:
Timestamp:
Jul 29, 2019, 11:36:09 PM (5 years ago)
Author:
Murray Heymann <heymann.murray@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
feed60bef09898f675e0f8605ed0ac0eaa8bed5a
Parents:
da1ec3de158a4f05384b9a83be86fc4c1942ec5fc1b9ababa50e8059dd847da0957f50aea901e6a8
Message:
Merge branch 'machine_learning' of github.com:MHeymann/Sources into machine_learning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_ops.cc

    rda1ec3 r8d8fef  
    625625 *
    626626**/
    627 int
    628 size ( const CanonicalForm & f )
     627int size ( const CanonicalForm & f )
    629628{
    630629    if ( f.inCoeffDomain() )
     
    636635        for ( i = f; i.hasTerms(); i++ )
    637636            result += size( i.coeff() );
     637        return result;
     638    }
     639}
     640
     641int size_maxexp ( const CanonicalForm & f, int& maxexp )
     642{
     643    if ( f.inCoeffDomain() )
     644        return 1;
     645    else
     646    {
     647        if (f.degree()>maxexp) maxexp=f.degree();
     648        int result = 0;
     649        CFIterator i;
     650        for ( i = f; i.hasTerms(); i++ )
     651            result += size_maxexp( i.coeff(), maxexp );
    638652        return result;
    639653    }
Note: See TracChangeset for help on using the changeset viewer.