Skip to content

Trevorstrobel/Set-Operations-api

Repository files navigation

Set-Operations-api

Set Operations API

API functionallity

Currently implemented API functions are found within the set-relation.R file. Other files are for testing or documentation purposes and should not be used as an API. The following are the currently implemented endpoints:

  • /getSetUnion
  • /getSetIntersect
  • /getAsymDiff
  • /getSetComplement
  • /getSetEquality
  • /getSetCardinality
  • /getSymmDiff
  • /getSetPartitions

Endpoints in Detail

/getSetUnion(qType, qDifficulty, dataType)

Topic: setUnion

Parameters
  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 

The return is as follows:

  {
  "topic": [
    "setUnion"
  ],
  "type": [
    "1"
  ],
  "format": [
    "1"
  ],
  "difficulty": [
    "1"
  ],
  "question": {
    "content": [
      [
        "Let A and B be two sets. What is \\$A\\cup B\\$?"
      ],
      [
        "\\$A=\\$ \\$\\{ 13, 3, 4, 8, 12  \\}\\$"
      ],
      [
        "\\$B=\\$ \\$\\{ 17, 8, 5, 15, 13  \\}\\$"
      ]
    ],
    "correct": [
      "\\$\\{ 13, 3, 4, 8, 12, 17, 5, 15  \\}\\$"
    ],
    "distractors": [
      [
        "\\$\\{ 13, 3, 4, 12, 17, 5, 15  \\}\\$"
      ],
      [
        "\\$\\{ 13, 3, 4, 8, 12, 17, 5, 15, 5  \\}\\$"
      ],
      [
        "\\$\\{ 13, 3, 8, 12, 17, 5, 15  \\}\\$"
      ]
    ]
  }
}

/getSetIntersect(qType, qDifficulty, dataType)

Topic: setIntersect

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 

/getAsymDiff(qType, qDifficulty, dataType)

Topic: asymmetricDifference

Parameters
  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 

/getSetComplement(qType, qDifficulty, dataType)

Topic: setComplement

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 
                                       

/getSetEquality(qType, qDifficulty, dataType)

Topic: setEquality

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 
                                       

/getSetCardinality(qType, qDifficulty, dataType)

Topic: setCardinality

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 

/getSymmDiff(qType, qDifficulty, dataType)

Topic: symmetricDifference

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 

/getSetPartitions(qType, qDifficulty, dataType)

Topic: setPartitions

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 
                                       

/setExpressions(qType, qDifficulty)

Topic: setExpressions

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
 

/powerSetQ(qType, qDifficulty, dataType)

Topic: powerSet

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 
                                       

/cartesianProduct(qType, qDifficulty, dataType)

Topic: cartesianProduct

Parameters

  @param    qType           Question Type ('1': Multiple Choice)
  
  @param    qDifficulty     Question Difficutly (1:easiest - 5:hardest)
  
  @param    dataType        Data type (1: Ints, 2: Real, 3: Complex, 
                                       4: Char, 5: String, 6: Mixed) 
                                       

About

Set Operations API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published