Beispiel #1
0
Obj             ElmRecHandler (
    Obj                 self,
    Obj                 rec,
    Obj                 rnam )
{
    return ELM_REC( rec, INT_INTOBJ(rnam) );
}
Beispiel #2
0
Obj GAP_ElmRecord(Obj rec, Obj name)
{
    UInt rnam = RNamObj(name);
    if (ISB_REC(rec, rnam))
        return ELM_REC(rec, rnam);
    return 0;
}
Beispiel #3
0
 int getOrbitStart() const
 { 
    // printf("getOrbitStart.");
     Obj o = ELM_REC(sc, RName_orbit);
 //    ELM_REC(sc, RName_orbit); printf("!\n"); 
     return GAP_get<int>(ELM_LIST(o, 1));
 }
Beispiel #4
0
  Obj get(const char* c)
  {
    UInt n = RNamName(c);
    if(!has(c))
      throw GAPException("field not in record");

    return ELM_REC(record, n);
  }
Obj GAP_get_rec(Obj rec, UInt n)
{
    if(!IS_REC(rec))
        throw GAPException("Invalid attempt to read record");
    if(!ISB_REC(rec, n))
        throw GAPException(std::string("Unable to read value from rec"));
    return ELM_REC(rec, n);
}
Beispiel #6
0
static Obj ElmRecError(Obj rec, UInt rnam)
{
    rec = ErrorReturnObj(
        "Record Element: <rec> must be a record (not a %s)",
        (Int)TNAM_OBJ(rec), 0L,
        "you can replace <rec> via 'return <rec>;'" );
    return ELM_REC( rec, rnam );
}
// This is a special method. It gets a boolean from a record, and assumes
// it is 'false' if not present
bool GAP_get_maybe_bool_rec(Obj rec, UInt n)
{
    if(!IS_REC(rec))
        throw GAPException("Invalid attempt to read record");
    if(!ISB_REC(rec, n))
        return false;
    Obj b = ELM_REC(rec, n);
    if(b == True)
        return true;
    if(b == False)
        return false;
    throw GAPException("Record element is not a boolean");
}
Beispiel #8
0
 vec1<int> getOrbit() const
 { //printf("GetOrbit."); ELM_REC(sc, RName_orbit); printf("!\n"); 
 return GAP_get<vec1<int> >(ELM_REC(sc, RName_orbit)); }
Beispiel #9
0
 vec1<Permutation> getLabels() const
 { return GAP_get<vec1<Permutation> >(ELM_REC(sc, RName_labels)); }
Beispiel #10
0
 vec1<optional<int> > getTranslabels() const
 { return GAP_get<vec1<optional<int> > >(ELM_REC(sc, RName_translabels)); }
Beispiel #11
0
 GAPStabChainWrapper getNextLevel() const
 { return GAPStabChainWrapper(ELM_REC(sc, RName_stabilizer)); }
Beispiel #12
0
 int transversalSize() const
 { return LEN_LIST(ELM_REC(sc, RName_transversal)); }