Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class system #3

Open
Jean-Baptiste-Camps opened this issue Jun 16, 2017 · 2 comments
Open

Class system #3

Jean-Baptiste-Camps opened this issue Jun 16, 2017 · 2 comments
Assignees

Comments

@Jean-Baptiste-Camps
Copy link
Owner

The PCC.Stemma output does not seem to have a class associated to it. I need to create one, and verify globally that the class system is consistent.

@Jean-Baptiste-Camps Jean-Baptiste-Camps self-assigned this Jun 16, 2017
@Jean-Baptiste-Camps
Copy link
Owner Author

Jean-Baptiste-Camps commented Jun 19, 2017

Class system as is:
pccConflicts (function PCC.conflicts)

\value{
    An object of class "pccConflicts", a list containing edgelist, conflictsTotal and original database
    \item{edgelist}{a two-column character matrix, giving the edges between variant locations in the network of conflicts}
    \item{conflictsTotal}{a one-column numeric matrix, giving the total number of conflicts per variant location}
    \item{database}{the original database used for the calculations}
}

pccContam (function PCC.contam)

\value{
    An object of class "pccContam", a list containing
    \item{totalByMs}{a numeric matrix, with, in rows, each variant locations, and,   in columns, the total
        sum of conflicts and centrality index, followed by 
        the sum of conflicts, centrality index and difference to the total sum for the
        removal of each of the witnesses in turn}
    \item{conflictsDifferences}{a one row numeric matrix, containing, for each
        witness, the total decrease in conflicts caused by its removal from the
        computations}
    \item{database}{the original database used for the calculations}
}

pccElimination (function PCC.overconflicting) > pccOverconflicting

\value{
    An object of class "pccOverconflicting", a list containing the three same first objects as the "pccConflicts" input, 
    \item{edgelist}{a two-column character matrix, giving the edges between variant locations in the network of conflicts}
    \item{conflictsTotal}{a one-column numeric matrix, giving the total number of conflicts per variant location}
    \item{database}{the original database used for the calculations}
    and adding
    \item{vertexAttributes}{a two column character matrix, with a row per vertex of the network (i.e. variant location), giving its label and color}
}

pccEquipollentDatabases and pccEquipollentEdges > pccEquipollent
The function PCC.equipollent even has two possible classes:
pccEquipollentDatabases, if the tradition has been separated in several databases (globally or according to a single witness)
pccEquipollentEdges, if the user has chosen not to separate at all. It then yields a list with all groups without internal conflicts.

These two classes should be simplified. The last one is never reused. I suggest simply to merge them in a single class, a list with two components.
New class, pccEquipollent:

\value{
    An object of class pccEquipollent, a list containing
    \item{databases}{a list with all alternative databases that have been created, if any}
    \item{notInConflict}{a list with The group(s) of VL without internal conflicts}
}

N.B.: it seems that no classes have been defined for the functions of the PCC.Stemma family. Is it necessary? In the documentation, I refer to pccStemma class, etc., but such don't exist yet.

N.B.: For the moment, all these classes are informal S3 classes. It could be a good idea to implement more formal classes, with setClass for instance.

@Jean-Baptiste-Camps
Copy link
Owner Author

New classes to be defined:

pccStemma (function PCC.Stemma)

If necessary (or to be consistent):

pccDisagreement (function PCC.disagreement)

pccBuildGroup (function PCC.buildGroup)

pccReconstructModel (function PCC.reconstructModel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant