{"id":18416911,"url":"https://github.com/rpdevjesco/genericdecisions","last_synced_at":"2026-07-03T00:31:41.473Z","repository":{"id":245619218,"uuid":"818775872","full_name":"RPDevJesco/GenericDecisions","owner":"RPDevJesco","description":"Generic Decision Systems","archived":false,"fork":false,"pushed_at":"2024-06-22T20:43:04.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T20:46:56.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RPDevJesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T20:41:55.000Z","updated_at":"2024-06-22T20:43:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d3a1b09-e74f-4928-9da9-10cded236a42","html_url":"https://github.com/RPDevJesco/GenericDecisions","commit_stats":null,"previous_names":["rpdevjesco/genericdecisions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RPDevJesco/GenericDecisions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FGenericDecisions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FGenericDecisions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FGenericDecisions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FGenericDecisions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RPDevJesco","download_url":"https://codeload.github.com/RPDevJesco/GenericDecisions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FGenericDecisions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35068133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:07:41.263Z","updated_at":"2026-07-03T00:31:41.445Z","avatar_url":"https://github.com/RPDevJesco.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"DecisionList\n\nA DecisionList is a simple structure that maintains a list of decisions, each with an associated priority. The key features include:\n\n    Adding Decisions: New decisions can be added to the list with a specified priority.\n    Removing Decisions: Decisions can be removed from the list by their name.\n    Retrieving Highest Priority Decision: The decision with the highest priority can be retrieved.\n    Printing All Decisions: All decisions in the list can be printed.\n\nExample:\n```csharp\nvar decisionList = new DecisionList\u003cstring\u003e();\ndecisionList.AddDecision(\"Buy Groceries\", \"Buy milk and eggs\", 2);\ndecisionList.AddDecision(\"Complete Assignment\", \"Finish math assignment\", 3);\ndecisionList.AddDecision(\"Exercise\", \"Go for a run\", 1);\n```\n\nDecisionTable\n\nA DecisionTable is a more structured way to represent a set of rules where each rule consists of conditions and an associated action. The key features include:\n\n    Adding Rules: Rules are added to the table with a list of conditions and an action.\n    Evaluating Context: The table evaluates a given context against its rules and executes the action of the first matching rule.\n\nExample:\n```csharp\nvar decisionTable = new DecisionTable\u003cDictionary\u003cstring, object\u003e\u003e();\ndecisionTable.AddRule(\n    new List\u003cCondition\u003cDictionary\u003cstring, object\u003e\u003e\u003e { new Condition\u003cDictionary\u003cstring, object\u003e\u003e(\"Is adult\", context =\u003e (int)context[\"age\"] \u003e= 18) },\n    new DecisionAction\u003cDictionary\u003cstring, object\u003e\u003e(\"Allow Entry\", context =\u003e Console.WriteLine(\"Entry Allowed\"))\n);\n```\n\nDecisionTree\n\nA DecisionTree is a hierarchical structure where each node represents a decision point with conditions and corresponding actions. The tree allows traversal through nodes based on the evaluation of conditions until a leaf node (final action) is reached. The key features include:\n\n    Nodes with Conditions and Actions: Nodes can represent conditions (internal nodes) or actions (leaf nodes).\n    Traversal Based on Conditions: The tree is traversed by evaluating conditions at each node.\n\nExample:\n\n```csharp\nvar root = new TreeNode\u003cDictionary\u003cstring, object\u003e\u003e(new Condition\u003cDictionary\u003cstring, object\u003e\u003e(\"Is Gold Member\", context =\u003e (string)context[\"membership\"] == \"Gold\"));\nroot.AddChild(new TreeNode\u003cDictionary\u003cstring, object\u003e\u003e(new DecisionAction\u003cDictionary\u003cstring, object\u003e\u003e(\"Gold Discount\", context =\u003e Console.WriteLine(\"Gold Member: 20% Discount\"))));\n```\n\nObliqueDecisionTree\n\nAn ObliqueDecisionTree is similar to a DecisionTree but supports more complex decision-making scenarios where decisions are not strictly binary. It can have multiple branches and can handle more complex conditions. The key features include:\n\n    Complex Conditions: Supports more complex conditions for branching.\n    Multiple Branches: Nodes can have multiple children representing different branches.\n    Default Handling: Provides a mechanism to handle cases where no condition matches.\n\nExample:\n```csharp\nvar root = new ObliqueTreeNode\u003cDictionary\u003cstring, object\u003e\u003e(new Condition\u003cDictionary\u003cstring, object\u003e\u003e(\"Is Loyal Customer\", context =\u003e (bool)context[\"isLoyalCustomer\"]));\nroot.AddChild(new ObliqueTreeNode\u003cDictionary\u003cstring, object\u003e\u003e(new DecisionAction\u003cDictionary\u003cstring, object\u003e\u003e(\"Loyal Customer Discount\", context =\u003e Console.WriteLine(\"Loyal Customer: 20% Discount\"))));\nroot.SetDefaultChild(new ObliqueTreeNode\u003cDictionary\u003cstring, object\u003e\u003e(new DecisionAction\u003cDictionary\u003cstring, object\u003e\u003e(\"No Discount\", context =\u003e Console.WriteLine(\"No Discount Available\"))));\n```\n\nDifferences\n\n    Structure and Complexity:\n        DecisionList: Simple list-based structure, suitable for linear decision-making based on priorities.\n        DecisionTable: Tabular structure, suitable for rule-based systems where each rule has multiple conditions and an action.\n        DecisionTree: Hierarchical tree structure, suitable for scenarios where decisions are made through a sequence of conditions.\n        ObliqueDecisionTree: Enhanced tree structure, suitable for complex decision-making scenarios with multiple branches and complex conditions.\n\n    Use Cases:\n        DecisionList: Best for simple, linear prioritization tasks.\n        DecisionTable: Best for rule-based decision-making with clear, distinct rules.\n        DecisionTree: Best for hierarchical decision processes where each decision leads to another decision point.\n        ObliqueDecisionTree: Best for complex scenarios where decisions are not strictly binary and require handling multiple conditions and branches.\n\n    Decision Evaluation:\n        DecisionList: Evaluates based on priority.\n        DecisionTable: Evaluates all conditions in the rules to find a match.\n        DecisionTree: Traverses the tree based on conditions until a leaf node is reached.\n        ObliqueDecisionTree: Traverses the tree based on complex conditions and handles default actions if no conditions match.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fgenericdecisions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpdevjesco%2Fgenericdecisions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fgenericdecisions/lists"}