Skip to content

Commit

Permalink
Improve docs a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Mar 13, 2015
1 parent 927207d commit 80aaced
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/basic_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ There are three types of variables that are supported:
Variables of built-in integral types (**int**, **long long**, **char**, etc.), built-in floating-point types
(**float**, **double**), and **std::string**.

|
- **Vector**

**std::vector<T>**, where **T** is a scalar type as defined above.

|
- **Matrix**

**std::vector<std::vector<T>>**, where **T** is a scalar type as defined above.
Expand Down Expand Up @@ -111,7 +115,7 @@ There are three types of segments that are supported:
void InputFormat() {
LINE(N);
EMPTY_LINE();
LINE(A % SIZE(N));
LINE(A % SIZE(3));
LINE(M, B % SIZE(M));
}

Expand Down Expand Up @@ -143,14 +147,15 @@ There are three types of segments that are supported:
LINES(X, Y) % SIZE(N);
}

With V = {1, 2}, X = {100, 110}, Y = {200, 210}, N = 2, the above segments will produce:
With V = {1, 2}, X = {100, 110, 120}, Y = {200, 210, 220}, N = 3, the above segments will produce:

::

1
2
100 200
110 210
120 220

- **Grid segment**

Expand Down Expand Up @@ -191,6 +196,8 @@ variables. There are two ways for defining constraints:

Override the method **BaseProblem::Constraints()**.

|
- **With subtasks**

Override each of the methods **BaseProblem::SubtaskX()**, where **X** is a positive integer denoting the subtask
Expand Down Expand Up @@ -260,6 +267,8 @@ This component is defined by overriding the method **BaseGenerator::Config()**.

If not specified, the default directory name is **tc**.

|
- **setSolution(string solutionExecutionCommand)**

Sets the command for executing the official solution. This will be used for generating test case output files. For
Expand Down Expand Up @@ -321,6 +330,8 @@ defining constraints:
- Test Group 2: assigned to subtasks 2 and 3
- Test Group 3: assigned to subtask 3

|
To define test groups, override each of the methods **BaseGenerator::TestGroupX()**, where **X** is a positive integer
denoting the test group number. For the current version, **X** can only be at most 10. Then, call
**assignToSubtasks(S)** method as the first statement, where **S** is a list of subtask numbers. For example:
Expand Down Expand Up @@ -422,11 +433,15 @@ Generation can fail due to several reasons:

In this case, no test cases will be generated. For example: using scalar variable for a grid segment.

|
- **Invalid input variable states**

For example: a grid segment requires that the size is 2 x 3, but after applying the test case definition, the matrix
consists of 3 x 4 elements.

|
- **Unsatisfied constraints/subtasks**

The input variables do not conform to the constraints.

0 comments on commit 80aaced

Please sign in to comment.