Skip to content

Commit dade23b

Browse files
committed
Removed getters and setters from the SAS models for performance
1 parent f0217c1 commit dade23b

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Models/SAS/Fact.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace PDDLSharp.Models.SAS
44
{
55
public class Fact
66
{
7-
public int ID { get; set; } = -1;
8-
public string Name { get; }
9-
public string[] Arguments { get; }
7+
public int ID = -1;
8+
public string Name;
9+
public string[] Arguments;
1010

1111
public Fact(string name, params string[] arguments)
1212
{

Models/SAS/Operator.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ namespace PDDLSharp.Models.SAS
44
{
55
public class Operator
66
{
7-
public int ID { get; set; } = -1;
8-
public string Name { get; }
9-
public string[] Arguments { get; }
10-
public Fact[] Pre { get; }
11-
public HashSet<int> PreRef { get; }
12-
public Fact[] Add { get; }
13-
public HashSet<int> AddRef { get; }
14-
public Fact[] Del { get; }
15-
public HashSet<int> DelRef { get; }
7+
public int ID = -1;
8+
public string Name;
9+
public string[] Arguments;
10+
public Fact[] Pre;
11+
public HashSet<int> PreRef;
12+
public Fact[] Add;
13+
public HashSet<int> AddRef;
14+
public Fact[] Del;
15+
public HashSet<int> DelRef;
1616

1717
public Operator(string name, string[] arguments, Fact[] pre, Fact[] add, Fact[] del)
1818
{

Models/SAS/SASDecl.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace PDDLSharp.Models.SAS
44
{
55
public class SASDecl
66
{
7-
public HashSet<string> DomainVariables { get; set; }
8-
public List<Operator> Operators { get; set; }
9-
public HashSet<Fact> Goal { get; set; }
10-
public HashSet<Fact> Init { get; set; }
7+
public HashSet<string> DomainVariables;
8+
public List<Operator> Operators;
9+
public HashSet<Fact> Goal;
10+
public HashSet<Fact> Init;
1111

1212
private Dictionary<int, Operator> _operatorDict;
1313
private Dictionary<int, Fact> _factDict;

PDDLSharp/PDDLSharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<PropertyGroup>
1717
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
18-
<Version>1.6.5</Version>
18+
<Version>1.6.6</Version>
1919
</PropertyGroup>
2020

2121
<PropertyGroup>

0 commit comments

Comments
 (0)