From f804da7d8811e5ef2ffa6fc8fa7481a3282ddf46 Mon Sep 17 00:00:00 2001 From: enx01 Date: Tue, 24 Feb 2026 10:02:08 +0100 Subject: [PATCH] first --- .idea/.gitignore | 10 ++ .idea/editor.xml | 345 ++++++++++++++++++++++++++++++++++++++++++++++ .idea/graphe.iml | 2 + .idea/misc.xml | 7 + .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + CMakeLists.txt | 7 + main.c | 6 + structs.h | 21 +++ 9 files changed, 412 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/editor.xml create mode 100644 .idea/graphe.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 CMakeLists.txt create mode 100644 main.c create mode 100644 structs.h diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/.idea/graphe.iml b/.idea/graphe.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/.idea/graphe.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d2060fb --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6bb3443 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 4.1) +project(graphe C) + +set(CMAKE_C_STANDARD 23) + +add_executable(graphe main.c + structs.h) diff --git a/main.c b/main.c new file mode 100644 index 0000000..e1988a3 --- /dev/null +++ b/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Hello, World!\n"); + return 0; +} \ No newline at end of file diff --git a/structs.h b/structs.h new file mode 100644 index 0000000..1405fbc --- /dev/null +++ b/structs.h @@ -0,0 +1,21 @@ +// +// Created by Tiago Batista Cardoso on 2/23/2026. +// + +#ifndef GRAPHE_STRUCTS_H +#define GRAPHE_STRUCTS_H + +struct node_t { + int id; // node id + struct node_t **neighbours; // node neighbours +}; +typedef struct node_t node_t; + +struct graph_t { + int n; // number of nodes + int p; // probability that two nodes from the same group are linked + int q; // probability that two nodes from different groups are linked +}; +typedef struct graph_t graph_t; + +#endif //GRAPHE_STRUCTS_H \ No newline at end of file